Download Latest Version v2.8.34 source code.zip (2.4 MB)
Email in envelope

Get an email when there's a new version of Zip.js

Home / v2.8.31
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2026-07-15 1.2 kB
v2.8.31 source code.tar.gz 2026-07-15 2.1 MB
v2.8.31 source code.zip 2026-07-15 2.4 MB
Totals: 3 Items   4.5 MB 0

New features

  • Accept a non-constructable reader (a factory function, not only a Reader class) as the Reader of a ZipFileEntry/ZipDirectoryEntry; the reader is now invoked with or without new depending on whether it exposes a prototype.
  • Export the ERR_ITERATOR_COMPLETED_TOO_SOON and ERR_WRITER_NOT_INITIALIZED error constants.

Bug fixes

  • Add a dedicated index.d.cts so TypeScript resolves the correct types for the CommonJS entry point instead of falling back to the ESM declarations.
  • Fix invalid entries in the MIME type table: drop the bogus x-font/pcf.Z and duplicate video/avif entries, correct the mis-keyed application/x-ms-installer (msi), and map image/avif to both avif and avifs.
  • Align the JavaScript zlib module with the windowBits: -16 raw-stream convention.

Performance

  • Build the MIME type map lazily from a compact JSON payload, so the table is only parsed when a MIME type is actually requested.
  • Shrink the WebAssembly zlib module by ~8 KB (~16%) by merging the deflate64 path into the inflate code and generating the deflate trees at runtime.
  • Reduce bundle size by mangling internal property names and shipping inline worker payloads deflate-compressed.
Source: README.md, updated 2026-07-15