package
node-zip - Zip/Unzip files ported from JSZip
npm install node-zipGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
node-zip - Zip/Unzip files ported from JSZip
npm install node-zipZip:
var zip = new require('node-zip')();
zip.file('test.file', 'hello there');
var data = zip.generate({base64:false,compression:'DEFLATE'});
console.log(data); // ugly dataUnzip:
var zip = new require('node-zip')(data, {base64: false, checkCRC32: true});
console.log(zip.files['test.file']); // hello thereYou can also load directly:
require('node-zip');
var zip = new JSZip(data, options)
...Write to a file (IMPORTANT: use binary encode, thanks to @Acek)
var fs = require("fs");
zip.file('test.txt', 'hello there');
var data = zip.generate({base64:false,compression:'DEFLATE'});
fs.writeFileSync('test.zip', data, 'binary');npm install -g jasmine-node
jasmine-node testnode-zip uses JSZip, please refer to their website for further information: http://stuartk.com/jszip/
David Duponchel @dduponchel
Feel free to send your pull requests and contribute to this project
MIT
Estimated unpacked size across 12 packages.
3.6 MB
Includes dependencies.