Skip to content

v2.6.24

Choose a tag to compare

@gildas-lormeau gildas-lormeau released this 09 Sep 00:01
· 1682 commits to master since this release

Added a new option when creating a ZipReader instance or when calling ZipReader#getData(). This option is named transferStreams and is set to true by default.

  • When set to false, zip.js should work as before. zip.js will read/write chunks of data when decompressing data by exchanging messages between the main thread and web workers.
  • When set to true, zip.js will try to transfer the ReadableStream and the WritableStream instances used when decompressing data to the web workers. Thus, data is transferred natively between the main thread and the web workers.
    If the environment does not allow streams to be transferred to web workers, zip.js automatically falls back to the implementation corresponding to transferStreams set to false.

Note that transferable streams are not supported in Deno currently.