paperclipai/paperclip · error
Unsupported zip archive: this browser cannot read compressed
Error message
Unsupported zip archive: this browser cannot read compressed zip entries.
What it means
Browser zip reader environment check: DeflateStream/DecompressionStream('deflate-raw') is unavailable in this browser, so compressed (DEFLATE) entries cannot be inflated. The user should use a modern browser; the archive itself is fine — only the runtime lacks decompression support.
Source
Thrown at ui/src/lib/zip.ts:173
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;
while (offset + 4 <= bytes.length) {
const signature = readUint32(bytes, offset);
if (signature === 0x02014b50 || signature === 0x06054b50) break;View on GitHub (pinned to 120ae5428f)
Solutions
- Use a browser that supports DecompressionStream (modern Chrome/Edge/Firefox), or upload an uncompressed (STORE) zip.
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at ui/src/lib/zip.ts:173 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/40b016e5242ce94a.
Report an issue: GitHub.