{
  "name": "archiver",
  "version": "0.9.1",
  "description": "a streaming interface for archive generation",
  "homepage": "https://github.com/ctalkington/node-archiver",
  "author": {
    "name": "Chris Talkington",
    "url": "http://christalkington.com/"
  },
  "repository": {
    "type": "git",
    "url": "https://github.com/ctalkington/node-archiver.git"
  },
  "bugs": {
    "url": "https://github.com/ctalkington/node-archiver/issues"
  },
  "licenses": [
    {
      "type": "MIT",
      "url": "https://github.com/ctalkington/node-archiver/blob/master/LICENSE-MIT"
    }
  ],
  "main": "lib/archiver.js",
  "files": [
    "lib",
    "LICENSE-MIT"
  ],
  "engines": {
    "node": ">= 0.8.0"
  },
  "scripts": {
    "test": "mocha --reporter dot",
    "bench": "node benchmark/simple/pack-zip.js"
  },
  "dependencies": {
    "buffer-crc32": "~0.2.1",
    "readable-stream": "~1.0.24",
    "tar-stream": "~0.3.0",
    "zip-stream": "~0.3.0",
    "lazystream": "~0.1.0",
    "file-utils": "~0.1.5",
    "lodash": "~2.4.1"
  },
  "devDependencies": {
    "chai": "~1.8.1",
    "mocha": "~1.16.0",
    "rimraf": "~2.2.0",
    "mkdirp": "~0.3.5",
    "stream-bench": "~0.1.2"
  },
  "keywords": [
    "archive",
    "archiver",
    "stream",
    "zip",
    "tar"
  ],
  "readme": "# Archiver v0.9.1 [![Build Status](https://travis-ci.org/ctalkington/node-archiver.svg?branch=master)](https://travis-ci.org/ctalkington/node-archiver)\r\n\r\na streaming interface for archive generation\r\n\r\n[![NPM](https://nodei.co/npm/archiver.png)](https://nodei.co/npm/archiver/)\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install archiver --save\r\n```\r\n\r\nYou can also use `npm install https://github.com/ctalkington/node-archiver/archive/master.tar.gz` to test upcoming versions.\r\n\r\n## Archiver\r\n\r\n#### create(format, options)\r\n\r\nCreates an Archiver instance based on the format (zip, tar, etc) passed. Parameters can be passed directly to `Archiver` constructor for convenience.\r\n\r\n#### registerFormat(format, module)\r\n\r\nRegisters an archive format. Format modules are essentially transform streams with a few required methods. They will be further documented once a formal spec is in place.\r\n\r\n### Instance Methods\r\n\r\nInherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) methods.\r\n\r\n#### append(input, 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 `entry` event is fired.\r\n\r\nReplaced `#addFile` in v0.5.\r\n\r\n```js\r\narchive.append('string', { name:'string.txt' });\r\narchive.append(new Buffer('string'), { name:'buffer.txt' });\r\narchive.append(fs.createReadStream('mydir/file.txt'), { name:'stream.txt' });\r\narchive.append(null, { name:'dir/' });\r\n```\r\n\r\n#### bulk(mappings)\r\n\r\nAppends multiple entries from passed array of src-dest mappings, based on [Grunt's \"Files Array\" format](http://gruntjs.com/configuring-tasks#files-array-format). A lazystream wrapper is used to prevent issues with open file limits.\r\n\r\n[Globbing patterns](http://gruntjs.com/configuring-tasks#globbing-patterns) and [multiple properties](http://gruntjs.com/configuring-tasks#building-the-files-object-dynamically) are supported through use of the [file-utils](https://github.com/SBoudrias/file-utils) package, based on Grunt's file utilities. Please note that multiple src files to single dest file (ie concat) is not supported.\r\n\r\nThe `data` property can be set (per src-dest mapping) to define data for matched entries.\r\n\r\n```js\r\narchive.bulk([\r\n  { src: ['mydir/**'], data: { date: new Date() } },\r\n  { expand: true, cwd: 'mydir', src: ['**'], dest: 'newdir' }\r\n]);\r\n```\r\n\r\n#### file(filepath, data)\r\n\r\nAppends a file given its filepath. Uses a lazystream wrapper to prevent issues with open file limits. When the instance has received, processed, and emitted the file, the `entry` event is fired.\r\n\r\n```js\r\narchive.file('mydir/file.txt', { name:'file.txt' });\r\n```\r\n\r\n#### finalize()\r\n\r\nFinalizes the instance. You should listen for the `end`/`close`/`finish` of the destination stream to properly detect completion.\r\n\r\n#### pointer()\r\n\r\nReturns the current byte length emitted by archiver. Use this in your end callback to log generated size.\r\n\r\n## Events\r\n\r\nInherits [Transform Stream](http://nodejs.org/api/stream.html#stream_class_stream_transform) events.\r\n\r\n#### entry\r\n\r\nFired when the input has been received, processed, and emitted. Passes entry data as first argument.\r\n\r\n## Zip\r\n\r\n### 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#### 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. Defaults to octal 0755 (directory) or 0644 (file).\r\n\r\n## Tar\r\n\r\n### Options\r\n\r\n#### gzip `boolean`\r\n\r\nCompresses the tar archive using gzip, default is false.\r\n\r\n#### gzipOptions `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#### 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#### mode `number`\r\n\r\nSets the entry permissions. Defaults to octal 0755 (directory) or 0644 (file).\r\n\r\n## Libraries\r\n\r\nArchiver makes use of several libraries/modules to avoid duplication of efforts.\r\n\r\n- [zip-stream](https://npmjs.org/package/zip-stream)\r\n- [tar-stream](https://npmjs.org/package/tar-stream)\r\n\r\n## Things of Interest\r\n\r\n- [Examples](https://github.com/ctalkington/node-archiver/blob/master/examples)\r\n- [Changelog](https://github.com/ctalkington/node-archiver/releases)\r\n- [Contributing](https://github.com/ctalkington/node-archiver/blob/master/CONTRIBUTING.md)\r\n- [MIT License](https://github.com/ctalkington/node-archiver/blob/master/LICENSE-MIT)",
  "readmeFilename": "README.md",
  "_id": "archiver@0.9.1",
  "dist": {
    "shasum": "096eff6b6bea33ad5ec02512b122028e30db7382"
  },
  "_from": "archiver@~0.9.0",
  "_resolved": "https://registry.npmjs.org/archiver/-/archiver-0.9.1.tgz"
}
