Installation
Install JSZipp from npm and import only the browser ZIP APIs your app needs.
Package manager
pnpm add jszipp
npm install jszipp
yarn add jszipp
Imports
import JSZipp, {
ZipWriter,
ZipTransformStream,
openZip,
readZipStream
} from "web-jszipp";
JSZipp is the default namespace export. Named exports are usually clearer in application code and help bundlers keep unused code out of the final app.
Runtime
- ECMAScript 2019 output.
- Modern browsers with
ReadableStream,TransformStream,Blob, andTextDecoder. DecompressionStreamis needed when reading deflated entries.- Node.js can run the tests, but the public API is designed around browser primitives.
First step after install: use
ZipWriter for creating archives and openZip for random-access reading of uploaded ZIP files.