Skip to content

Releases: httptoolkit/brotli-wasm

v3.0.0

18 Jun 09:49
0842adc
Compare
Choose a tag to compare

Breaking changes

  • Update minimum engine version to Node v18
  • Updated Brotli Rust package from v3.3 to v5 (should be no API changes, but behaviour may vary slightly YMMV)

v2.0.0

12 Jul 16:25
e1a6e5a
Compare
Choose a tag to compare

Breaking changes

Streams API has changed significantly, streams no longer expose result() or last_input_offset() methods, and the compress() and decompress() methods return a result object, not just a buffer. Instead of querying state from the stream itself, you can now access it from the result, which exposes 3 properties:

  • buf - the output (the compressed/decompressed data.
  • code - the result code, corresponding to a value from brotli.BrotliStreamResultCode.
  • input_offset - the offset into the input stream that was read during this operation.

This resolves many issues with streams that could result in data corruption and processing failures. See the README for an updated example of how to use this with web streams.

The non-streaming API remains unchanged.