Releases: httptoolkit/brotli-wasm
Releases · httptoolkit/brotli-wasm
v3.0.0
v2.0.0
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 frombrotli.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.