minizip-asm.js
Minizip in javascript. Demo: https://rf00.github.io/minizip-asm.js/example/
Features
- Zip file
- Extract file
- Work with password
Installation
<script src="https://raw.githubusercontent.com/rf00/minizip-asm.js/master/lib/minizip-asm.min.js"></script>
npm install minizip-asm.js
var Minizip = require('minizip-asm.js');
Getting started
var fs = require("fs");
var text = new Buffer("Abc~~~");
var mz = new Minizip();
mz.append("haha/abc.txt", text, {password: "~~~"});
fs.writeFileSync("abc.zip", new Buffer(mz.zip()));
Usage
new Minizip(ArrayBuffer)
Constructor for making a new zip file or opening from existing one.
mz.list(options)
List all files in Minizip with full filepath and have password or not.
Extract one file.
mz.append(filepath, data, options)
Append one file.
mz.zip()
Retrive zip file.
Notice
- It is synchronize.
- The size of minizip-asm.min.js is around 0.6MB.