Skip to content

Type Alias: ZipInputValue ​

ZipInputValue = string | number[] | Uint8Array | ArrayBuffer | Blob

Inputs the read path accepts. A string is a filesystem path (Node) read from disk; in-memory archives are passed as Uint8Array/ArrayBuffer/Blob/ number[]. A Promise wrapper is allowed so callers can forward an unawaited byte source.

Note: unlike JSZip's loadAsync, a string is NOT a latin1 binary-content string. That JSZip-compat interpretation was a footgun — every real consumer passes a path, and a path silently became garbage bytes → "Not a valid ZIP archive". To read a binarystring/base64 write-path output back in, convert it to bytes first (e.g. Uint8Array.from(atob(b64), c => c.charCodeAt(0))).