Currently WASM to/from JS of brotli-wasm uses UInt8Array to pass data, which requires all data loaded into memory in advance. It is OK for small files (TBH it is common for Brotli) but as for big files such as > 1G, this will cause a huge memory usage.
brotli crate provides steaming ways such as Compressor writer to (de)compress data piece by piece. It would be nice for the package to include them.
I am the maintainer of brotli-dec-wasm and a streaming binding implementation is included in it. If the feature is recognized as required, I would be willing to giving a PR to implement the feature for the repo.
Currently WASM to/from JS of
brotli-wasm
usesUInt8Array
to pass data, which requires all data loaded into memory in advance. It is OK for small files (TBH it is common for Brotli) but as for big files such as > 1G, this will cause a huge memory usage.brotli
crate provides steaming ways such asCompressor
writer to (de)compress data piece by piece. It would be nice for the package to include them.I am the maintainer of
brotli-dec-wasm
and a streaming binding implementation is included in it. If the feature is recognized as required, I would be willing to giving a PR to implement the feature for the repo.