v2.8.41
·
354 commits
to master
since this release
What's Changed in v2.8.41
New features
- The
DecompressionStreamof codecs registered withregisterCodecnow receives thecompressionMethod,rawBitFlaganduncompressedSizevalues of the entry. TheCompressionStreamreceives thecompressionMethodvalue. 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
TypeErrorexceptions and hangs when the global stream classes are overridden with a polyfill like web-streams-polyfill whileBlob#stream()andResponsestill return native streams, e.g. on Firefox 99 and older (cf. #669) - The dynamic import used to load codecs registered with a
codecURIvalue 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 withERR_UNSUPPORTED_COMPRESSIONwhen the compression method was also unsupported
Full Changelog: v2.8.39...v2.8.41