gunzip-maybe
Transform stream that gunzips its input if it is gzipped and just echoes it if not
Last updated 4 years ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install gunzip-maybe 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.4.2                                ...           latest (4 years ago)

13 Versions

  • 1.4.2                                ...           4 years ago
  • 1.4.1                                ...           7 years ago
  • 1.4.0                                ...           8 years ago
  • 1.3.1                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           10 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
  • 0.0.0                                ...           10 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (6)
Dev Dependencies (3)
Dependents (3)

Copyright 2013 - present © cnpmjs.org | Home |