![npm unzipper npm unzipper](https://i.imgur.com/Hd9Qzph.png)
stream() - returns a stream of the unzipped content which can be piped to any destination.Each file element has the following methods: The open methods return a promise on the contents of the directory, with individual files listed in an array.
![npm unzipper npm unzipper](https://res.cloudinary.com/practicaldev/image/fetch/s--AK0H79dB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1600/1*aRAiHOPwSAGnffuFtAGghA.jpeg)
The Open methods load take a different approach: load the central directory first (at the end of the zipfile) and provide the ability to pick and choose which zipfiles to extract, even extracting them in parallel. Previous methods rely on the entire zipfile being received through a pipe. Please note: Methods that use the Central Directory instead of parsing entire file can be found under Open Installation There are no added compiled dependencies - inflation is handled by node.js's built in zlib support.
#Npm unzipper zip
Unzipper provides simple APIs similar to node-tar for parsing and extracting zip files. The new Parser will push any parsed entries downstream if you pipe from it, while still supporting the legacy entry event as well.īreaking changes: The new Parser will not automatically drain entries if there are no listeners or pipes in place. The stucture of this fork is similar to the original, but uses Promises and inherit guarantees provided by node streams to ensure low memory footprint and guarantee finish/close events at the end of processing.