{"record":{"id":"478e702d875ee974","repo":"paperclipai/paperclip","slug":"unsupported-zip-archive-only-store-and-deflate-en-478e70","errorCode":null,"errorMessage":"Unsupported zip archive: only STORE and DEFLATE entries are supported.","messagePattern":"Unsupported zip archive: only STORE and DEFLATE entries are supported\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"ui/src/lib/zip.ts","lineNumber":170,"sourceCode":"  if (contentType) {\n    return { encoding: \"base64\", data: bytesToBase64(bytes), contentType };\n  }\n  const text = decodeStrictUtf8(bytes);\n  if (text !== null) return text;\n  // Bytes that are not valid UTF-8 must not be decoded lossily; fall back\n  // to base64 so they round-trip exactly.\n  return { encoding: \"base64\", data: bytesToBase64(bytes), contentType: \"application/octet-stream\" };\n}\n\nfunction portableFileEntryToBytes(entry: CompanyPortabilityFileEntry): Uint8Array {\n  if (typeof entry === \"string\") return textEncoder.encode(entry);\n  return base64ToBytes(entry.data);\n}\n\nasync function inflateZipEntry(compressionMethod: number, bytes: Uint8Array) {\n  if (compressionMethod === 0) return bytes;\n  if (compressionMethod !== 8) {\n    throw new Error(\"Unsupported zip archive: only STORE and DEFLATE entries are supported.\");\n  }\n  if (typeof DecompressionStream !== \"function\") {\n    throw new Error(\"Unsupported zip archive: this browser cannot read compressed zip entries.\");\n  }\n  const body = new Uint8Array(bytes.byteLength);\n  body.set(bytes);\n  const stream = new Blob([body]).stream().pipeThrough(new DecompressionStream(\"deflate-raw\"));\n  return new Uint8Array(await new Response(stream).arrayBuffer());\n}\n\nexport async function readZipArchive(source: ArrayBuffer | Uint8Array): Promise<{\n  rootPath: string | null;\n  files: Record<string, CompanyPortabilityFileEntry>;\n}> {\n  const bytes = source instanceof Uint8Array ? source : new Uint8Array(source);\n  const entries: Array<{ path: string; body: CompanyPortabilityFileEntry }> = [];\n  let offset = 0;\n","sourceCodeStart":152,"sourceCodeEnd":188,"githubUrl":"https://github.com/paperclipai/paperclip/blob/120ae5428fa29bee300bcf806491cd4d965fbb7c/ui/src/lib/zip.ts#L152-L188","documentation":"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.","triggerScenarios":"Thrown at ui/src/lib/zip.ts:170 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Re-create the zip using STORE or DEFLATE compression only, then import again."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"120ae5428fa29bee300bcf806491cd4d965fbb7c","analyzedAt":"2026-08-18T22:49:45.177Z","contentChangedAt":"2026-08-18T22:49:45.177Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}