@stardazed/streams-compression
This package provides am implementation of compression streams
types from the Draft Compression Standard.
⚠️ Important: this is NOT a polyfill. The classes are just normal exports.
👉 If you want an all-in-one polyfill for streams, fetch interop, text encoding and compression streams,
use the ⭐️Stardazed streams polyfill⭐️!
Installation
pnpm add @stardazed/streams-compression
npm install @stardazed/streams-compression
yarn add @stardazed/streams-compression
Usage
import { DecompressionStream } from "@stardazed/streams-compression";
const byteReadable = ;
const decompressor = new DecompressionStream("deflate");
byteReadable
.pipeThrough(decompressor)
.pipeTo(byteWritable);
import { CompressionStream } from "@stardazed/streams-compression";
const byteReadable = ;
const compressor = new CompressionStream("gzip");
byteReadable
.pipeThrough(compressor)
.pipeTo(byteWritable);
Copyright
© 2019-Present by Arthur Langereis - @zenmumbler
License
MIT