Skip to content

Latest commit

 

History

History
47 lines (36 loc) · 705 Bytes

README.md

File metadata and controls

47 lines (36 loc) · 705 Bytes

pwzip

Node Zip Library

  • Simple usage
  • async / Promises
  • low memory usage
  • Zip64 support
  • Encrypted zip (ZipCrypto and AES)

currently only unzip

Installation

Will be available using npm later.

Examples

promises

const Zip = require('pwzip');

const zip = new Zip();

zip.open('archive.zip').then(() => {
  return zip.extract('folder', { password: 'password' });
}).catch(err => {
  console.error(err);
}).finally(() => {
  zip.close();
});

es6

const Zip = require('pwzip');

const zip = new Zip();

try {
  await zip.open('archive.zip');
  await zip.extract('folder', { password: 'password' });
} catch(err) {
  console.error(err);
} finally {
  await zip.close();
}