brotli-wasm icon indicating copy to clipboard operation
brotli-wasm copied to clipboard

Chunking support for large files

Open willfarrell opened this issue 3 years ago • 2 comments
trafficstars

The ability, or an example if already supported (via buffer.write?), to allow NodeJS/WebStream to be build around it.

Example: https://github.com/Daninet/hash-wasm#advanced-usage-with-streaming-input

willfarrell avatar Aug 20 '22 21:08 willfarrell

Streaming support is available - there's some examples in the tests here: https://github.com/httptoolkit/brotli-wasm/blob/47542a2d76bf87ce721fcceefe046b81b352c6e0/test/brotli.spec.ts#L105-L265

That's really just exposing the underlying crate's own streaming API. No proper documentation yet, but PRs are very welcome!

pimterry avatar Aug 22 '22 11:08 pimterry

Thanks, I'll try this approach out

willfarrell avatar Aug 23 '22 05:08 willfarrell