Comparing version 0.5.0 to 0.6.0
{ | ||
"name": "unzipper", | ||
"version": "0.5.0", | ||
"version": "0.6.0", | ||
"description": "Unzip cross-platform streaming API ", | ||
@@ -29,2 +29,3 @@ "author": "Evan Oxfeld <eoxfeld@gmail.com>", | ||
"buffer-indexof-polyfill": "~1.0.0", | ||
"duplexer2": "~0.1.4", | ||
"fstream": "~1.0.10", | ||
@@ -31,0 +32,0 @@ "listenercount": "~1.0.1", |
@@ -35,3 +35,3 @@ # unzipper [![Build Status](https://api.travis-ci.org/ZJONSSON/node-unzipper.png)](https://api.travis-ci.org/ZJONSSON/node-unzipper) | ||
__Important__: If you do not intend to consume an entry stream's raw data, call autodrain() to dispose of the entry's | ||
contents. Otherwise you risk running out of memory. | ||
contents. Otherwise you the stream will halt. | ||
@@ -95,4 +95,15 @@ ```js | ||
### Parse a single file and pipe contents | ||
`unzipper.parseOne([regex])` is a convenience method that unzips only one file from the archive and pipes the contents down (not the entry itself). If no serch criteria is specified, the first file in the archive will be unzipped. Otherwise, each filename will be compared to the criteria and the first one to match will be unzipped and piped down. If no file matches then the the stream will end without any content. | ||
Example: | ||
```js | ||
fs.createReadStream('path/to/archive.zip') | ||
.pipe(unzipper.ParseOne()) | ||
.pipe(fs.createReadStream('firstFile.txt')); | ||
``` | ||
## Licenses | ||
See LICENCE |
@@ -9,2 +9,3 @@ 'use strict'; | ||
exports.Parse = require('./lib/parse'); | ||
exports.ParseOne = require('./lib/parseOne'); | ||
exports.Extract = require('./lib/extract'); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38588
28
569
107
8
7
+ Addedduplexer2@~0.1.4
+ Addedduplexer2@0.1.4(transitive)