Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
streaming zip/unzip for node.js
JavaScript
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
headers
test
.gitignore
.travis.yml
README.md
constants.js
file-entry.js
package.json
parser.js
unzipstream.js
zipstream.js
zstream.js

README.md

zstream

zipping and unzipping in JavaScript

zstream is to provide a well-maintained, complete streaming API for working with zip archives in node.js.

zstream is super early, and not ready for use yet.

Usage

Recursively zip up a directory (this doesn't work yet):

var zs = require('zstream'),
    fs = require('fs'),
    fstream = require('fstream'); // isaacs/fstream

var sourceDir = fstream.Reader('my/directory');

sourceDir.pipe(zs.ZipStream())
    .pipe(fs.createWriteStream('newzipfile.zip'));

Unzip a zip file into a directory:

var zs = require('zstream'),
    fs = require('fs'),
    fstream = require('fstream'); // isaacs/fstream

fs.createReadStream('somezipfile.zip')
    .pipe(new zs.UnzipStream())
    .pipe(fstream.Writer('new/directory'));

authors

@alunny

license

MIT

Something went wrong with that request. Please try again.