Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@stardazed/streams-compression

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@stardazed/streams-compression

Implementation of compression streams

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
447
decreased by-22.93%
Maintainers
1
Weekly downloads
 
Created
Source

@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 */

© 2019-Present by Arthur Langereis - @zenmumbler

License

MIT

FAQs

Package last updated on 23 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc