Answers for "Putting password in a zip file using node.js"

0

Putting password in a zip file using node.js

var fs = require("fs");
var Minizip = require('minizip-asm.js');
/*
https://www.npmjs.com/package/minizip-asm.js
*/

var text = new Buffer("HI!");
var mz = new Minizip();

mz.append("Folder/Readme.txt", text, { password: "secret" });
fs.writeFileSync("Test.zip", new Buffer(mz.zip()));
Posted by: Guest on September-20-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language