(maybe) decompresses a stream
https://jsr.io/@mary/maybe-decompression-stream
| .vscode | initial commit | |
| lib | chore: simplify tests a little bit | |
| deno.json | chore: add tests | |
| deno.lock | chore: add tests | |
| LICENSE | initial commit | |
| README.md | docs: add links to readme | |
maybe-decompression-stream
decompresses a stream of data if it is compressed with gzip, otherwise it passes the data through.
const response = await fetch('resource.tgz');
const stream = response.body.pipeThrough(new MaybeDecompressionStream());
for await (const chunk of stream) {
// ...
}