gildas-lormeau/zip.js
JavaScript library to zip and unzip files supporting multi-core compression, web streams, zip64, split files, data encryption, and deflate64 decompression.
📋 What's Changed
- Fix return types for entry progress callbacks by @EvanHahn in https://github.com/gildas-lormeau/zip.js/pull/648
- Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.8.25...v2.8.26
📋 Changes
- fixed `HttpRangeReader` bug when reading compressed sizes multiples of 65536 (see #646)
- updated dev dependencies
📋 Changes
- No changes, attempt to fix NPM publishing
📋 Changes
- Fixed zip64 auto-detection with `keepOrder` set to `false` in `ZipWriter`
- Updated dev dependencies
Fixed support of option `keepOrder` when set to `false` in `ZipWriter` (the option is set to `true` by default)
Implemented workaround (feature test) for `DOMException` serialization bug in Deno version 2.6.x (fix https://github.com/gildas-lormeau/zip.js/issues/636)
📋 Changes
- Fixed inadvertently removed [createTempStream](https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipWriterConstructorOptions.html#createtempstream) option into `ZipWriter`
- Added [transferStreams](https://gildas-lormeau.github.io/zip.js/api/interfaces/WorkerConfiguration.html#transferstreams) support in `ZipWriter`
Removed unwanted `web-worker` dependency inadvertently added in the `package.json` file of version `2.8.17`
📋 Changes
- Added [`createTempStream`](https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipWriterConstructorOptions.html#createtempstream) option to `ZipWriter`, used when adding entries in parallel, for custom temporary buffered write storage (e.g. filesystem, OPFS, network) instead of the default in-memory `TransformStream` (see this [test](https://github.com/gildas-lormeau/zip.js/blob/4cf50a673b73213ebf0d673333ef928738a06e79/tests/all/test-custom-temp-buffer.js) for a usage example)
- Improved buffering implementation in `ZipWriter` by removing the `Blob`/`Response` usage
- Fixed minor regression introduced in version `2.8.16` when the web worker URI is not a data or blob URI (workers were not working with code using ES6 `import`) (see [related test](https://github.com/gildas-lormeau/zip.js/blob/c6ab5788eadb09dbc23208b1e438b2eec4ffa531/tests/all/test-core.js))
Fixed support of Web Workers when running zip.js with Bun (see #638)
📋 Changes
- Implemented lazy evaluation of the existence of the `Worker` API to facilitate the use of polyfills on Node.js (e.g. [`web-worker`](https://www.npmjs.com/package/web-worker)), see https://github.com/gildas-lormeau/zip.js/discussions/635#discussioncomment-15633490 for more info
- Updated dev dependencies
📋 Changes
- Fixed NPM Access Token expiration issue (see https://github.com/gildas-lormeau/zip.js/issues/633)
- Fixed minor issues in the documentation
📋 Changes
- Fixed compressed size value in local headers when creating zip files using ZIP64 implicitly, i.e. when the `zip64` option is not set to `true` (see https://github.com/gildas-lormeau/zip.js/issues/627) and, for example, creating ZIP files weighting more than 4GB.
- Fixed potential empty ZIP64 extra field in local headers
📋 Changes
- Fixed regression (briefly) introduced in version [2.8.12](https://github.com/gildas-lormeau/zip.js/releases/tag/v2.8.12) leading to missing data in ZIP64 Extra field of the central directory entries.
📋 Changes
- Fixed potential warnings when unzipping files by removing unexpected data in the ZIP64 extra field of the local headers (see https://github.com/gildas-lormeau/zip.js/issues/625) in `ZipWriter`
- Updated dev dependencies
📋 What's Changed
- Add missing typings for `useWebWorkers` and `useCompressionStream` to `ZipWriterConstructorOptions` by @ws333 in https://github.com/gildas-lormeau/zip.js/pull/616
✨ New Contributors
- @ws333 made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/616
- Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.8.10...v2.8.11
Fixed built files (built files of v2.8.9 are not updated)
Fixed potential "Error: process error:-50331648" when decompressing deflate64 data
📋 Changes
- fixed entry comments encoding in `ZipWriter` (see #609)
- improved `Uint8ArrayWriter` buffer growth strategy (see #610)
- improved Unix/MS-DOS metadata support in `ZipWriter` and `ZipReader`:
- https://gildas-lormeau.github.io/zip.js/api/interfaces/EntryMetaData.html#externalfileattributes
- https://gildas-lormeau.github.io/zip.js/api/interfaces/EntryMetaData.html#msdosattributes
- https://gildas-lormeau.github.io/zip.js/api/interfaces/EntryMetaData.html#gid
- https://gildas-lormeau.github.io/zip.js/api/interfaces/EntryMetaData.html#uid
- https://gildas-lormeau.github.io/zip.js/api/interfaces/EntryMetaData.html#sticky
- + 11 more
Improved bugfix of `v2.8.6` when enqueuing sub-array of `Uint8Array` instances into a `WritableStream` (with web workers enabled).
Fixed bug when enqueuing sub-array of `Uint8Array` instances into a `WritableStream` in environments supporting web workers and transferable objects (see https://github.com/gildas-lormeau/zip.js/discussions/606)
📋 Changes
- Optimized size of built files (approx 7%) when using native (i.e. pure JS) compression/decompression (see files/exports suffixed with`-native`). The code of web workers is now compressed at built time with the mini-compressor used to compress the code of the WASM module (see [mini-lz.js](https://github.com/gildas-lormeau/zip.js/blob/master/lib/core/util/mini-lz.js)), and decompressed at runtime.
- Fixed path to the WASM module in the default configuration
📋 What's Changed
- Added export of web workers and WASM module files in the `package.json` file by @jschwartzbeck in https://github.com/gildas-lormeau/zip.js/pull/607
- Fixed potential race condition when initializing the WASM module in the main thread (i.e. with web workers disabled)
✨ New Contributors
- @jschwartzbeck made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/607
📋 Changes
- Added support of JavaScript-based implementation (based on zlib) of Compression Streams API (see https://github.com/gildas-lormeau/zlib-streams-ts) as an alternative to the default WASM-based implementation. See the new `exports` property in the `package.json` file and files in the `/dist` folder, JavaScript-based implementations are suffixed with `-native` (e.g. `./index-native.js`).
- Fixed `malloc` error in environments not fully supporting WASM (see https://github.com/gildas-lormeau/zip.js/issues/605)
✨ New in version 2.8
- 1. WebAssembly Integration
- Replaced JavaScript compression and decompression implementation with WebAssembly zlib module (https://github.com/gildas-lormeau/zlib-streams. This improves security and performance when native `CompressionStream` and `DecompressionStream` APIs are not used (for example, when using custom compression levels or decompressing deflate64 data) or unavailable.
- Added the `wasmURI` configuration property to provide the module URI if necessary (for example, when the CSP blocks data URIs).
- 2. Deflate64 Decompression Support
- Added support of proprietary Deflate64 decompression algorithm which can be used by Windows when compressing large files (see https://github.com/gildas-lormeau/zip.js/issues/517)
- 3. Simplified Configuration
- Replaced the complex `workerScripts` configuration with a single `workerURI` property, making it easier to set up web workers.
- Default values for `workerURI` and `wasmURI` are provided, reducing the need for manual configuration when building code.
- + 3 more
💥 Breaking Changes
- 1. Worker Configuration Changes:
- The `workerScripts` property in the configuration was removed and replaced with `workerURI` (and `wasmURI` for the WASM module).
- 2. Stream Implementation Updates:
- The `Deflate` and `Inflate` properties in the configuration were removed and replaced with `CompressionStream` and `DecompressionStream`.
- 3. Deprecated Classes Removed:
- The deprecated classes `SplitZipReader` and `SplitZipWriter` were removed.
- 4. Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as `EventBasedZipLibrary`, `initShimAsyncCodec`, and `EventBasedCodec` were removed.
- + 2 more
📋 What's Changed in v2.8.2
- Fix edge cases of uncompressed size check by @0f-0b in https://github.com/gildas-lormeau/zip.js/pull/600
- Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.8.1...v2.8.2
✨ New in version 2.8
- 1. WebAssembly Integration
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when `CompressionStream` and `DecompressionStream` are not used.
- 2. Deflate64 decompression support
- Added support of proprietary Deflate64 decompression algorithm which used by Windows when compressing large files (see https://github.com/gildas-lormeau/zip.js/issues/517)
- 3. Simplified Configuration
- Replaced the complex `workerScripts` configuration with a single `workerURI` property, making it easier to set up web workers.
- Default values for `workerURI` and `wasmURI` are provided, reducing the need for manual configuration.
- 4. Improved Type Safety and Clarity
- + 2 more
💥 Breaking Changes
- 1. Worker Configuration Changes:
- The `workerScripts` property in the configuration was removed and replaced with `workerURI` and `wasmURI`.
- 2. Stream Implementation Updates:
- The `Deflate` and `Inflate` properties in the configuration were removed and replaced with `CompressionStream` and `DecompressionStream`.
- 3. Deprecated Classes Removed:
- The deprecated classes `SplitZipReader` and `SplitZipWriter` were removed.
- 4. Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as `EventBasedZipLibrary`, `initShimAsyncCodec`, and `EventBasedCodec` were removed.
- + 3 more
✨ New in version 2.8
- 1. WebAssembly Integration
- Added support for WebAssembly module based on zlib (see https://github.com/gildas-lormeau/zlib-streams) to enhance performance for compression and decompression tasks when `CompressionStream` and `DecompressionStream` are not used.
- 2. Deflate64 decompression support
- Added support of proprietary Deflate64 decompression algorithm which used by Windows when compressing large files (see https://github.com/gildas-lormeau/zip.js/issues/517)
- 3. Simplified Configuration
- Replaced the complex `workerScripts` configuration with a single `workerURI` property, making it easier to set up web workers.
- Default values for `workerURI` and `wasmURI` are provided, reducing the need for manual configuration.
- 4. Improved Type Safety and Clarity
- + 2 more
💥 Breaking Changes
- 1. Worker Configuration Changes:
- The `workerScripts` property in the configuration was removed and replaced with `workerURI` and `wasmURI`.
- 2. Stream Implementation Updates:
- The `Deflate` and `Inflate` properties in the configuration were removed and replaced with `CompressionStream` and `DecompressionStream`.
- 3. Deprecated Classes Removed:
- The deprecated classes `SplitZipReader` and `SplitZipWriter` were removed.
- 4. Event-Based Codec Support Removed:
- Interfaces and classes related to event-based codecs, such as `EventBasedZipLibrary`, `initShimAsyncCodec`, and `EventBasedCodec` were removed.
- + 2 more
📋 What's Changed
- fix: type of Uint8ArrayWriter by @targos in https://github.com/gildas-lormeau/zip.js/pull/594
✨ New Contributors
- @targos made their first contribution in https://github.com/gildas-lormeau/zip.js/pull/594
- Full Changelog: https://github.com/gildas-lormeau/zip.js/compare/v2.7.72...v2.7.73
📋 Changes
- Fixed regression when using zip.js in Node < 21.2 with the option `useCompressionStream` not explicitly set to `false` (Node.js does not support the `deflate-raw` format of the [`CompressionStream`](https://developer.mozilla.org/en-US/docs/Web/API/CompressionStream/CompressionStream) API in version < 21.2)
- Removed useless files from the JSR repository
📋 Changes
- Improved security in `ZipReader` by:
- adding the [`checkOverlappingEntry`](https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipReaderOptions.html#checkoverlappingentry) and [`checkOverlappingEntryOnly`](https://gildas-lormeau.github.io/zip.js/api/interfaces/ZipReaderOptions.html#checkoverlappingentryonly) options (`false` by default) to detect potential non-recursive zip-bombs (e.g. "[A better zip bomb](https://www.bamsoftware.com/hacks/zipbomb/)"), more info here: https://github.com/gildas-lormeau/zip.js/discussions/587#discussioncomment-13911457
- making sure that the output size of the decompressed entry data matches the expected size exactly
- Fixed `URLString` type in the type definition file
- Updated dev dependencies