Socket
Socket
Sign inDemoInstall

gunzip-maybe

Package Overview
Dependencies
23
Maintainers
2
Versions
13
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gunzip-maybe

Transform stream that gunzips its input if it is gzipped and just echoes it if not


Version published
Weekly downloads
3.5M
decreased by-0.22%
Maintainers
2
Install size
1.12 MB
Created
Weekly downloads
 

Readme

Source

gunzip-maybe

Transform stream that gunzips its input if it is gzipped and just echoes it if not.

npm install gunzip-maybe

build status js-standard-style

Usage

Simply pipe a gzipped (or not gzipped) stream to gunzip([maxRecursion = 3]) and read the unzipped content. maxRecursion protects the unzip mechanism from an infinite recursion in case of a malicious archive.

// this will gunzip gzippedStream
gzippedStream.pipe(gunzip()).pipe(process.stdout);

// this will just echo plainTextStream
plainTextStream.pipe(gunzip()).pipe(process.stdout);

CLI usage

npm install -g gunzip-maybe
gunzip-maybe --help # will print out usage

License

MIT

FAQs

Last updated on 22 Apr 2020

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc