{
  "name": "zip-stream",
  "version": "0.3.4",
  "description": "a streaming zip archive generator.",
  "homepage": "https://github.com/ctalkington/node-zip-stream",
  "author": {
    "name": "Chris Talkington",
    "url": "http://christalkington.com/"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/ctalkington/node-zip-stream.git"
  },
  "bugs": {
    "url": "https://github.com/ctalkington/node-zip-stream/issues"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/ctalkington/node-zip-stream/blob/master/LICENSE-MIT"
    }
  ],
  "main": "lib/zip-stream.js",
  "files": [
    "lib",
    "LICENSE-MIT"
  ],
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "mocha --reporter dot"
  },
  "dependencies": {
    "crc32-stream": "~0.2.0",
    "deflate-crc32-stream": "~0.1.0",
    "readable-stream": "~1.0.26",
    "lodash.defaults": "~2.4.1",
    "buffer-crc32": "~0.2.1",
    "debug": "~0.8.0"
  },
  "devDependencies": {
    "chai": "~1.9.1",
    "mocha": "~1.18.2",
    "rimraf": "~2.2.8",
    "mkdirp": "~0.5.0"
  },
  "keywords": [
    "archive",
    "stream",
    "zip-stream",
    "zip"
  ],
  "readme": "# zip-stream v0.3.3 [![Build Status](https://travis-ci.org/ctalkington/node-zip-stream.svg?branch=master)](https://travis-ci.org/ctalkington/node-zip-stream)\r\n\r\nzip-stream is a streaming zip archive generator. It was built to be a successor to [zipstream](https://npmjs.org/package/zipstream). Dependencies are kept to a minimum through the use of many of node's built-in modules including the use of zlib module for compression.\r\n\r\n[![NPM](https://nodei.co/npm/zip-stream.png)](https://nodei.co/npm/zip-stream/)\r\n\r\n### Install\r\n\r\n```bash\r\nnpm install zip-stream --save\r\n```\r\n\r\nYou can also use `npm install https://github.com/ctalkington/node-zip-stream/archive/master.tar.gz` to test upcoming versions.\r\n\r\n### Usage\r\n\r\nThis module is meant to be wrapped internally by other modules and therefore lacks any queue management. This means you have to wait until the previous entry has been fully consumed to add another. Nested callbacks should be used to add multiple entries. There are modules like [async](https://npmjs.org/package/async) that ease the so called \"callback hell\".\r\n\r\nIf you want a module that handles entry queueing and much more, you should check out [archiver](https://npmjs.org/package/archiver) which uses this module internally.\r\n\r\n```js\r\nvar packer = require('zip-stream');\r\nvar archive = new packer(); // OR new packer(options)\r\n\r\narchive.on('error', function(err) {\r\n  throw err;\r\n});\r\n\r\n// pipe archive where you want it (ie fs, http, etc)\r\n// listen to the destination's end, close, or finish event\r\n\r\narchive.entry('string contents', { name: 'string.txt' }, function(err, entry) {\r\n  if (err) throw err;\r\n  archive.entry(null, { name: 'directory/' }, function(err, entry) {\r\n    if (err) throw err;\r\n    archive.finalize();\r\n  });\r\n});\r\n```\r\n\r\n### Instance API\r\n\r\n#### entry(input, data, callback(err, data))\r\n\r\nAppends an input source (text string, buffer, or stream) to the instance. When the instance has received, processed, and emitted the input, the callback is fired.\r\n\r\n#### finalize()\r\n\r\nFinalizes the instance. You should listen to the destination stream's `end`/`close`/`finish` event to know when all output has been safely consumed.\r\n\r\n### Instance Options\r\n\r\n#### comment `string`\r\n\r\nSets the zip comment.\r\n\r\n#### forceUTC `boolean`\r\n\r\nIf true, forces the entry date to UTC. Helps with testing across timezones.\r\n\r\n#### store `boolean`\r\n\r\nIf true, all entry contents will be archived without compression by default.\r\n\r\n#### zlib `object`\r\n\r\nPassed to node's [zlib](http://nodejs.org/api/zlib.html#zlib_options) module to control compression. Options may vary by node version.\r\n\r\n### Entry Data\r\n\r\n#### name `string` `required`\r\n\r\nSets the entry name including internal path.\r\n\r\n#### type `string`\r\n\r\nSets the entry type. Defaults to `file` or `directory` if name ends with trailing slash.\r\n\r\n#### date `string|Date`\r\n\r\nSets the entry date. This can be any valid date string or instance. Defaults to current time in locale.\r\n\r\n#### store `boolean`\r\n\r\nIf true, entry contents will be archived without compression.\r\n\r\n#### comment `string`\r\n\r\nSets the entry comment.\r\n\r\n#### mode `number`\r\n\r\nSets the entry permissions. (experimental)\r\n\r\n## Debugging\r\n\r\nThis library makes use of the [debug](https://npmjs.org/package/debug) module with a namespace of `zip-stream` which can be triggered by setting `DEBUG` in your environment like so:\r\n\r\n```shell\r\n# unix\r\nDEBUG=zip-stream:* node script\r\n\r\n# windows (powershell)\r\n$env:DEBUG=\"zip-stream:*\"\r\nnode script\r\n\r\n# windows (cmd)\r\nSET DEBUG=\"zip-stream:*\"\r\nnode script\r\n```\r\n\r\n## Things of Interest\r\n\r\n- [Releases](https://github.com/ctalkington/node-zip-stream/releases)\r\n- [Contributing](https://github.com/ctalkington/node-zip-stream/blob/master/CONTRIBUTING.md)\r\n- [MIT License](https://github.com/ctalkington/node-zip-stream/blob/master/LICENSE-MIT)\r\n\r\n## Credits\r\n\r\nConcept inspired by Antoine van Wel's [zipstream](https://npmjs.org/package/zipstream) module, which is no longer being updated.",
  "readmeFilename": "README.md",
  "_id": "zip-stream@0.3.4",
  "dist": {
    "shasum": "05bf51398e41e31b407af3d831c8390d0b4b8c58"
  },
  "_from": "zip-stream@~0.3.0",
  "_resolved": "https://registry.npmjs.org/zip-stream/-/zip-stream-0.3.4.tgz"
}
