@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";

// expand deflated data
const byteReadable = /* Get a readable stream that produces binary chunks */;
const decompressor = new DecompressionStream("deflate");
byteReadable
    .pipeThrough(decompressor)
    .pipeTo(byteWritable); /* Stream that accepts Uint8Array chunks */
import { CompressionStream } from "@stardazed/streams-compression";

// compress arbitrary data
const byteReadable = /* Get a readable stream that produces binary chunks */;
const compressor = new CompressionStream("gzip");
byteReadable
    .pipeThrough(compressor)
    .pipeTo(byteWritable); /* Stream that accepts Uint8Array chunks */

Copyright

© 2019-Present by Arthur Langereis - @zenmumbler

License

MIT

@stardazed/streams-compression - Installation

To install @stardazed/streams-compression via this registry, you'll need to install via the --registry parameter with your package manager.

n

NPM

npm install @stardazed/streams-compression --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Yarn

yarn config set registry https://js.registry.sudovanilla.org
yarn install @stardazed/streams-compression

Learn more about the config option.

PNPM

pnpm install @stardazed/streams-compression --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Bun Logo

Bun

bun install @stardazed/streams-compression --registry https://js.registry.sudovanilla.org

Learn more about the --registry parameter.

Learn more about setting this up in your bunfig.toml configuration.


For Deno, add the following to your .npmrc file in your directory:

registry="https://js.registry.sudovanilla.org"

Then run the deno install command.

@stardazed/streams-compression - Download

Download Tarball (v1.0.0)

Integrity sha512-SQCiwxdIVJ5xxUBYptN+fc+tJpSDbxQuJ0+3u2SmHjIzr6JIRZ28AVFtFnGy6x6j3UBlaLx73w9rC6UAFxnd1g==
SHASUM c31298cbbc2a579732b9c9e641a2e8308fe38411
Tarball https://js.registry.sudovanilla.org/@stardazed/streams-compression/-/streams-compression-1.0.0.tgz