Skip to content

v2.8.41

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 11 Aug 18:24
· 354 commits to master since this release

What's Changed in v2.8.41

New features

  • The DecompressionStream of codecs registered with registerCodec now receives the compressionMethod, rawBitFlag and uncompressedSize values of the entry. The CompressionStream receives the compressionMethod value. This makes it possible to implement codecs for compression methods which cannot be decoded from the stream alone. For example, LZMA (method 14) without the end-of-stream marker, or the legacy Shrink, Reduce and Implode methods (1 to 6). Tests validate these changes with decompression codecs ported from hwzip for Shrink (method 1), Reduce (methods 2 to 5) and Implode (method 6), including Reduce archives produced by PKZIP 0.92. Tests also read DCL Implode archives (method 10) produced by SecureZIP with a codec based on node-pkware, and round-trip new entries with and without encryption

Bug fixes

  • Streams passed to zip.js are now normalized when they come from another implementation of the Streams API. This fixes TypeError exceptions and hangs when the global stream classes are overridden with a polyfill like web-streams-polyfill while Blob#stream() and Response still return native streams, e.g. on Firefox 99 and older (cf. #669)
  • The dynamic import used to load codecs registered with a codecURI value is now excluded from the static analysis of webpack and Vite. This fixes the "Critical dependency: the request of a dependency is an expression" warning when bundling zip.js (fix #670)
  • Entries protected with the strong encryption feature of PKWARE are now always rejected with ERR_UNSUPPORTED_ENCRYPTION. They were previously rejected with ERR_UNSUPPORTED_COMPRESSION when the compression method was also unsupported

Full Changelog: v2.8.39...v2.8.41