You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// extract file
import * as Minizip from 'minizip-asm.js'
import * as fs from 'fs'
var mz = new Minizip(Buffer.from(fs.readFileSync('test.zip'))); // fails here
var textBuffer = mz.extract('test.txt', { password: "psd"})
console.log(textBuffer.toString()); // "content"
The text was updated successfully, but these errors were encountered:
// create file
import * as Minizip from 'minizip-asm.js'
import * as fs from 'fs'
var text = Buffer.from("content");
var mz = new Minizip();
mz.append("test.txt", text, {password: "psd"});
fs.writeFileSync("test.zip", Buffer.from(mz.zip()));
// extract file
import * as Minizip from 'minizip-asm.js'
import * as fs from 'fs'
var mz = new Minizip(Buffer.from(fs.readFileSync('test.zip'))); // fails here
var textBuffer = mz.extract('test.txt', { password: "psd"})
console.log(textBuffer.toString()); // "content"
The text was updated successfully, but these errors were encountered: