ZipStream is a streaming zip archive generator based on the ZipArchiveOutputStream prototype found in the compress-commons project.
It was originally created to be a successor to zipstream.
ZipStream is available on npm.
$ npm install zip-stream
options object may contain the following properties:
comment- String - Sets the zip archive comment.
forceLocalTime- Boolean - Forces the archive to contain local file times instead of UTC.
forceZip64- Boolean - Forces the archive to contain ZIP64 headers.
store- Boolean - Sets the compression method to STORE.
zlib- Object - Passed to zlib to control compression
Appends an entry given an input source (text string, buffer, or stream).
source- Buffer | Stream | String - The input source.
data- Object - The entry data.
data object may contain the following properties:
name- String - The entry name including internal path.
comment- String - The entry comment.
date- String | Date - The entry date.
mode- Number - The entry permissions.
store- Boolean - The compression method to STORE.
type- String - The entry type. Defaults to
directoryif name ends with trailing slash.
Finalizes the instance and prevents further appending to the archive structure (queue will continue til drained).