gunzip-maybe
Transform stream that gunzips its input if it is gzipped and just echoes it if not
Last updated a month ago by mafintosh .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm 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 (a month ago)

13 Versions

  • 1.4.2                                ...           a month ago
  • 1.4.1                                ...           3 years ago
  • 1.4.0                                ...           3 years ago
  • 1.3.1                                ...           4 years ago
  • 1.3.0                                ...           4 years ago
  • 1.2.1                                ...           5 years ago
  • 1.2.0                                ...           5 years ago
  • 1.1.0                                ...           6 years ago
  • 1.0.3                                ...           6 years ago
  • 1.0.2                                ...           6 years ago
  • 1.0.1                                ...           6 years ago
  • 1.0.0                                ...           6 years ago
  • 0.0.0                                ...           6 years ago
Maintainers (2)
Downloads
Today 71
This Week 165
This Month 1,907
Last Day 94
Last Week 575
Last Month 2,492
Dependencies (6)
Dev Dependencies (3)
Dependents (219)

Copyright 2014 - 2016 © taobao.org |