mafintosh / Gunzip Maybe
Licence: mit
Transform stream that gunzips its input if it is gzipped and just echoes it if not
Stars: ✭ 84
Programming Languages
javascript
184084 projects - #8 most used programming language
gunzip-maybe
Transform stream that gunzips its input if it is gzipped and just echoes it if not.
npm install gunzip-maybe
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
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].