
Product
Socket Now Protects the Chrome Extension Ecosystem
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
node-zip - Zip/Unzip files ported from JSZip
npm install node-zip
Zip:
var zip = new require('node-zip')();
zip.file('test.file', 'hello there');
var data = zip.generate({base64:false,compression:'DEFLATE'});
console.log(data); // ugly data
Unzip:
var zip = new require('node-zip')(data, {base64: false, checkCRC32: true});
console.log(zip.files['test.file']); // hello there
You 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 test
node-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
FAQs
node-zip - Zip/Unzip files ported from JSZip
The npm package node-zip receives a total of 66,334 weekly downloads. As such, node-zip popularity was classified as popular.
We found that node-zip demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket is launching experimental protection for Chrome extensions, scanning for malware and risky permissions to prevent silent supply chain attacks.
Product
Add secure dependency scanning to Claude Desktop with Socket MCP, a one-click extension that keeps your coding conversations safe from malicious packages.
Product
Socket now supports Scala and Kotlin, bringing AI-powered threat detection to JVM projects with easy manifest generation and fast, accurate scans.