1
0
Fork
You've already forked pkg-maybe-decompression-stream
0
(maybe) decompresses a stream https://jsr.io/@mary/maybe-decompression-stream
  • TypeScript 100%
2025年08月14日 09:39:48 +07:00
.vscode initial commit 2025年03月28日 11:49:55 +07:00
lib chore: simplify tests a little bit 2025年03月28日 12:07:07 +07:00
deno.json chore: add tests 2025年03月28日 12:04:06 +07:00
deno.lock chore: add tests 2025年03月28日 12:04:06 +07:00
LICENSE initial commit 2025年03月28日 11:49:55 +07:00
README.md docs: add links to readme 2025年08月14日 09:39:48 +07:00

maybe-decompression-stream

JSR | source code

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) {
	// ...
}