Skip to content

xingrz/decompress-unzip

 
 

Repository files navigation

@xingrz/decompress-unzip test

license issues stars commits

@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.

License

MIT License

About

zip plugin for decompress

Resources

License

Stars

Watchers

Forks

Languages

  • TypeScript 98.7%
  • JavaScript 1.3%