paperclipai/paperclip · error

Unsupported zip archive: only STORE and DEFLATE entries are

Error message

Unsupported zip archive: only STORE and DEFLATE entries are supported.

What it means

Zip parsing limitation in the browser-side portability importer: an entry uses a compression method other than STORE (0) or DEFLATE (8), which the reader does not support. The archive must be re-exported with standard deflate/store compression; this is a capability boundary, not a corrupt file.

Source

Thrown at ui/src/lib/zip.ts:170

  if (contentType) {
    return { encoding: "base64", data: bytesToBase64(bytes), contentType };
  }
  const text = decodeStrictUtf8(bytes);
  if (text !== null) return text;
  // Bytes that are not valid UTF-8 must not be decoded lossily; fall back
  // to base64 so they round-trip exactly.
  return { encoding: "base64", data: bytesToBase64(bytes), contentType: "application/octet-stream" };
}

function portableFileEntryToBytes(entry: CompanyPortabilityFileEntry): Uint8Array {
  if (typeof entry === "string") return textEncoder.encode(entry);
  return base64ToBytes(entry.data);
}

async function inflateZipEntry(compressionMethod: number, bytes: Uint8Array) {
  if (compressionMethod === 0) return bytes;
  if (compressionMethod !== 8) {
    throw new Error("Unsupported zip archive: only STORE and DEFLATE entries are supported.");
  }
  if (typeof DecompressionStream !== "function") {
    throw new Error("Unsupported zip archive: this browser cannot read compressed zip entries.");
  }
  const body = new Uint8Array(bytes.byteLength);
  body.set(bytes);
  const stream = new Blob([body]).stream().pipeThrough(new DecompressionStream("deflate-raw"));
  return new Uint8Array(await new Response(stream).arrayBuffer());
}

export async function readZipArchive(source: ArrayBuffer | Uint8Array): Promise<{
  rootPath: string | null;
  files: Record<string, CompanyPortabilityFileEntry>;
}> {
  const bytes = source instanceof Uint8Array ? source : new Uint8Array(source);
  const entries: Array<{ path: string; body: CompanyPortabilityFileEntry }> = [];
  let offset = 0;

View on GitHub (pinned to 120ae5428f)

Solutions

  1. Re-create the zip using STORE or DEFLATE compression only, then import again.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at ui/src/lib/zip.ts:170 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of paperclipai/paperclip@120ae5428f (2026-08-18). Data as JSON: /api/errors/478e702d875ee974. Report an issue: GitHub.