@xingrz/decompress-unzip
v5.2.0-alpha.0
Published
decompress zip plugin
Downloads
22
Maintainers
Readme
@xingrz/decompress-unzip
@xingrz/decompress .zip plugin.
Install
npm install --save @xingrz/decompress-unzip
Usage
import decompress from '@xingrz/decompress';
import decompressUnzip from '@xingrz/decompress-unzip';
(async () => {
await decompress('unicorn.zip', 'dist', {
plugins: [
decompressUnzip()
]
});
console.log('Files decompressed');
})();
API
decompressUnzip(): (input: Buffer | Readable) => Promise<File[]>
Returns a Promise<File[]>
.
input
Type: Buffer
or stream.Readable
Buffer or stream to decompress.
Note: Although input of stream is supported, ZIP format itself doesn't support extracting in stream. This means memory consumption should be considered.