{"_id":"@alienkarma/archiver","_rev":"7-926753577b2cf37031e7108357aa2103","name":"@alienkarma/archiver","dist-tags":{"latest":"7.0.1-fork.6"},"versions":{"7.0.1-fork.1":{"name":"@alienkarma/archiver","version":"7.0.1-fork.1","keywords":["archive","archiver","stream","zip","tar"],"author":{"url":"http://christalkington.com/","name":"Chris Talkington"},"license":"MIT","_id":"@alienkarma/archiver@7.0.1-fork.1","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"}],"homepage":"https://github.com/archiverjs/node-archiver","bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"dist":{"shasum":"a2f2ec1ec6acddc404044dc4c01b85658089f183","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.1.tgz","fileCount":10,"integrity":"sha512-AIBJgqF52cdveZWNx/UVXhe3refVBCrBtzIW3+UXBiMjGRYzV0L4PXObNCaPB1mJ24B8n6YJFTd/CMyzggoT+A==","signatures":[{"sig":"MEUCIQDRxa4FYaNFjTW0H91B+HP24RaNJQrIVbZkENzdNDOZ6QIgBvJ+L93NfMsWFwhqhg59rgkDI40HEttkBTZXTkveIqg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41089},"type":"module","engines":{"node":">=18"},"exports":"./index.js","gitHead":"ff3a6bb7a01761d78434a93f75abf2dcb44fbd55","scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"_npmUser":{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},"repository":{"url":"git+https://github.com/archiverjs/node-archiver.git","type":"git"},"_npmVersion":"9.4.0","description":"a streaming interface for archive generation","directories":{},"_nodeVersion":"20.19.5","dependencies":{"async":"^3.2.4","is-stream":"^4.0.0","minimatch":"^10.2.1","lazystream":"^1.0.0","tar-stream":"^3.0.0","zip-stream":"^7.0.2","buffer-crc32":"^1.0.0","readdir-glob":"^1.1.3","normalize-path":"^3.0.0","readable-stream":"^4.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tar":"6.2.1","chai":"4.5.0","jsdoc":"4.0.4","mocha":"10.8.2","yauzl":"3.2.0","mkdirp":"3.0.1","rimraf":"5.0.10","prettier":"3.5.3","stream-bench":"0.1.2","archiver-jsdoc-theme":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/archiver_7.0.1-fork.1_1771569037525_0.5698517840488644","host":"s3://npm-registry-packages-npm-production"}},"7.0.1-fork.2":{"name":"@alienkarma/archiver","version":"7.0.1-fork.2","keywords":["archive","archiver","stream","zip","tar"],"author":{"url":"http://christalkington.com/","name":"Chris Talkington"},"license":"MIT","_id":"@alienkarma/archiver@7.0.1-fork.2","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"}],"homepage":"https://github.com/archiverjs/node-archiver","bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"dist":{"shasum":"f3aebe00be4b7d70643c4611bf1150276602a660","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.2.tgz","fileCount":10,"integrity":"sha512-yIOXjfx8wKNOKuluitqxZaqwsBIu6Ipa0wReVujOlR0uBPA5p98Sc6oRWy4MjpQDGXYHK98g4lXpB7ibaoeKeQ==","signatures":[{"sig":"MEUCIQCrH6dmTUODuqxf3SUBLti7nhCCWj+4R88z0UlJemZpKwIgPtktUaPexcAg0G3xTx1+YNzPljCsB9tfJzrKsLgFN94=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41089},"type":"module","engines":{"node":">=18"},"exports":"./index.js","gitHead":"ff3a6bb7a01761d78434a93f75abf2dcb44fbd55","scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"_npmUser":{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},"repository":{"url":"git+https://github.com/archiverjs/node-archiver.git","type":"git"},"_npmVersion":"9.4.0","description":"a streaming interface for archive generation","directories":{},"_nodeVersion":"20.19.5","dependencies":{"async":"^3.2.4","is-stream":"^4.0.0","minimatch":"^10.2.1","lazystream":"^1.0.0","tar-stream":"^3.0.0","zip-stream":"^7.0.2","buffer-crc32":"^1.0.0","readdir-glob":"^2.0.2","normalize-path":"^3.0.0","readable-stream":"^4.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tar":"6.2.1","chai":"4.5.0","jsdoc":"4.0.4","mocha":"10.8.2","yauzl":"3.2.0","mkdirp":"3.0.1","rimraf":"5.0.10","prettier":"3.5.3","stream-bench":"0.1.2","archiver-jsdoc-theme":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/archiver_7.0.1-fork.2_1771569446038_0.0066361179789022895","host":"s3://npm-registry-packages-npm-production"}},"7.0.1-fork.3":{"name":"@alienkarma/archiver","version":"7.0.1-fork.3","keywords":["archive","archiver","stream","zip","tar"],"author":{"url":"http://christalkington.com/","name":"Chris Talkington"},"license":"MIT","_id":"@alienkarma/archiver@7.0.1-fork.3","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"}],"homepage":"https://github.com/archiverjs/node-archiver","bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"dist":{"shasum":"2e00d02c2d748cf2f4062087539f447eb40fc0b1","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.3.tgz","fileCount":10,"integrity":"sha512-86lB7cFZ8fRkaSBzm7psOvGwe5b93VYMYfRNVHhbrxEX87jPWf8Dlzn0Cev6vmh7qv2cm+ZVr/KpHBjdmDt2aw==","signatures":[{"sig":"MEUCIG2PFgJkGoYt5sLwql3xhle1CQ0Zg5Sv+H7/8+AhPLvKAiEAl3NWyw3SwQ3Xyylch3Lvdnjkjgzkt8qI345hRAC81UA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41093},"type":"module","engines":{"node":">=18"},"exports":"./index.js","gitHead":"c8fea486a53469a1d8e32a825a21cfd579720613","scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"_npmUser":{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},"repository":{"url":"git+https://github.com/archiverjs/node-archiver.git","type":"git"},"_npmVersion":"9.4.0","description":"a streaming interface for archive generation","directories":{},"_nodeVersion":"20.19.5","dependencies":{"async":"^3.2.4","is-stream":"^4.0.0","minimatch":"^10.2.1","lazystream":"^1.0.0","tar-stream":"^3.0.0","zip-stream":"^7.0.2","buffer-crc32":"^1.0.0","readdir-glob":"^2.0.2","normalize-path":"^3.0.0","readable-stream":"^4.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tar":"6.2.1","chai":"4.5.0","jsdoc":"4.0.4","mocha":"10.8.2","yauzl":"3.2.0","mkdirp":"3.0.1","rimraf":"5.0.10","prettier":"3.5.3","stream-bench":"0.1.2","archiver-jsdoc-theme":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/archiver_7.0.1-fork.3_1771571529770_0.07358223759297244","host":"s3://npm-registry-packages-npm-production"}},"7.0.1-fork.4":{"name":"@alienkarma/archiver","version":"7.0.1-fork.4","keywords":["archive","archiver","stream","zip","tar"],"author":{"url":"http://christalkington.com/","name":"Chris Talkington"},"license":"MIT","_id":"@alienkarma/archiver@7.0.1-fork.4","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},{"name":"karankhanna047","email":"karan.khanna047@gmail.com"}],"homepage":"https://github.com/archiverjs/node-archiver","bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"dist":{"shasum":"e9bb898ebaddc760ae89cf2520963a0ec76436f3","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.4.tgz","fileCount":10,"integrity":"sha512-MWXGrw3GpCBOTt6AMQYbWIOFxHpRX2Qg7sg+4ny25rMMj/xZqqfEq1CyoV451lNCrl+ysZneBLevvxm0+gatUA==","signatures":[{"sig":"MEQCIH02lI2yleDTG7UOoXHifSza7x2SgFX6vlewlAXc0XNEAiBl7CpJpef4y6yl/1beq8fQML8uYKx7B+Pbnl54vLaEeA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41093},"type":"module","engines":{"node":">=18"},"exports":"./index.js","scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"_npmUser":{"name":"karankhanna047","email":"karan.khanna047@gmail.com"},"repository":{"url":"git+https://github.com/archiverjs/node-archiver.git","type":"git"},"_npmVersion":"10.8.2","description":"a streaming interface for archive generation","directories":{},"_nodeVersion":"18.20.8","dependencies":{"async":"^3.2.4","is-stream":"^4.0.0","minimatch":"^10.2.3","lazystream":"^1.0.0","tar-stream":"^3.0.0","zip-stream":"^7.0.2","buffer-crc32":"^1.0.0","readdir-glob":"^2.0.2","normalize-path":"^3.0.0","readable-stream":"^4.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tar":"6.2.1","chai":"4.5.0","jsdoc":"4.0.4","mocha":"10.8.2","yauzl":"3.2.0","mkdirp":"3.0.1","rimraf":"5.0.10","prettier":"3.5.3","stream-bench":"0.1.2","archiver-jsdoc-theme":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/archiver_7.0.1-fork.4_1772098730830_0.7050601542238935","host":"s3://npm-registry-packages-npm-production"}},"7.0.1-fork.5":{"name":"@alienkarma/archiver","version":"7.0.1-fork.5","keywords":["archive","archiver","stream","zip","tar"],"author":{"url":"http://christalkington.com/","name":"Chris Talkington"},"license":"MIT","_id":"@alienkarma/archiver@7.0.1-fork.5","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},{"name":"karankhanna047","email":"karan.khanna047@gmail.com"}],"homepage":"https://github.com/archiverjs/node-archiver","bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"dist":{"shasum":"608a31a197cc6b111c74bd8c1de2b7ef1ecb1fbe","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.5.tgz","fileCount":10,"integrity":"sha512-GGrqwaRAJkA366DVDSV/bbyghES3hnyzrkBidSNh+S5+bHz1f3Ls7xLPPwRvRXJHlVt1hbchg0c/q7ZWRa4HMw==","signatures":[{"sig":"MEUCIHZchlDRrDmHqJXLoKR80GWl1huFkjWhsHwBytF5ENBHAiEA+Xx1+waXUNqPPrLEFWnDU1qFX24svwgIjYH102YRiUg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41127},"type":"module","engines":{"node":">=18"},"exports":"./index.js","gitHead":"c8fea486a53469a1d8e32a825a21cfd579720613","scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"_npmUser":{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},"repository":{"url":"git+https://github.com/archiverjs/node-archiver.git","type":"git"},"_npmVersion":"9.4.0","description":"a streaming interface for archive generation","directories":{},"_nodeVersion":"20.19.5","dependencies":{"async":"^3.2.4","is-stream":"^4.0.0","minimatch":"^10.2.1","lazystream":"^1.0.0","tar-stream":"^3.0.0","zip-stream":"^7.0.2","buffer-crc32":"^1.0.0","readdir-glob":"^2.0.2","normalize-path":"^3.0.0","brace-expansion":"^2.0.3","readable-stream":"^4.0.0"},"publishConfig":{"registry":"https://registry.npmjs.org/"},"_hasShrinkwrap":false,"devDependencies":{"tar":"6.2.1","chai":"4.5.0","jsdoc":"4.0.4","mocha":"10.8.2","yauzl":"3.2.0","mkdirp":"3.0.1","rimraf":"5.0.10","prettier":"3.5.3","stream-bench":"0.1.2","archiver-jsdoc-theme":"1.1.3"},"_npmOperationalInternal":{"tmp":"tmp/archiver_7.0.1-fork.5_1777283815097_0.6248132353295202","host":"s3://npm-registry-packages-npm-production"}},"7.0.1-fork.6":{"name":"@alienkarma/archiver","version":"7.0.1-fork.6","description":"a streaming interface for archive generation","homepage":"https://github.com/archiverjs/node-archiver","author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"repository":{"type":"git","url":"git+https://github.com/archiverjs/node-archiver.git"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"license":"MIT","type":"module","exports":"./index.js","engines":{"node":">=18"},"scripts":{"test":"mocha --reporter dot","bench":"node benchmark/simple/pack-zip.js"},"dependencies":{"async":"^3.2.4","brace-expansion":"^5.0.8","buffer-crc32":"^1.0.0","is-stream":"^4.0.0","lazystream":"^1.0.0","minimatch":"^10.2.6","normalize-path":"^3.0.0","readable-stream":"^4.0.0","readdir-glob":"^2.0.2","tar-stream":"^3.0.0","zip-stream":"^7.0.2"},"devDependencies":{"archiver-jsdoc-theme":"1.1.3","chai":"4.5.0","jsdoc":"4.0.4","mkdirp":"3.0.1","mocha":"10.8.2","prettier":"3.5.3","rimraf":"5.0.10","stream-bench":"0.1.2","tar":"6.2.1","yauzl":"3.2.0"},"keywords":["archive","archiver","stream","zip","tar"],"publishConfig":{"registry":"https://registry.npmjs.org/"},"gitHead":"13e2ad18a041528984363ac36e1c9557b4f15518","_id":"@alienkarma/archiver@7.0.1-fork.6","_nodeVersion":"20.19.5","_npmVersion":"9.4.0","dist":{"integrity":"sha512-PjS/fae/X5X3WFTE94ts6VNcmJT1Xri9Hu31RRK8m6mZFLcB4PeOSzAPCBFsk5FkTRkTcD9Xw7az2PYXfI4Xtw==","shasum":"d5d85ec6ea427d1a9524cc04f43271c0b36862b7","tarball":"https://registry.npmjs.org/@alienkarma/archiver/-/archiver-7.0.1-fork.6.tgz","fileCount":10,"unpackedSize":41127,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCchuqn1m5tv2mZnfoX5bDxUcr1o/YqLxNxH3NGvWggAwIgb79lzqdFZ0u+HO6y6CRse4Hw1XohwjNFTsc/BgCaQ/s="}]},"_npmUser":{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},"directories":{},"maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},{"name":"karankhanna047","email":"karan.khanna047@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/archiver_7.0.1-fork.6_1785222878309_0.7762500305923312"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-20T06:30:37.447Z","modified":"2026-07-28T07:14:38.609Z","7.0.1-fork.1":"2026-02-20T06:30:37.676Z","7.0.1-fork.2":"2026-02-20T06:37:26.182Z","7.0.1-fork.3":"2026-02-20T07:12:09.916Z","7.0.1-fork.4":"2026-02-26T09:38:50.959Z","7.0.1-fork.5":"2026-04-27T09:56:55.244Z","7.0.1-fork.6":"2026-07-28T07:14:38.478Z"},"bugs":{"url":"https://github.com/archiverjs/node-archiver/issues"},"author":{"name":"Chris Talkington","url":"http://christalkington.com/"},"license":"MIT","homepage":"https://github.com/archiverjs/node-archiver","keywords":["archive","archiver","stream","zip","tar"],"repository":{"type":"git","url":"git+https://github.com/archiverjs/node-archiver.git"},"description":"a streaming interface for archive generation","maintainers":[{"name":"alienkarma","email":"abhi.karma.2007@gmail.com"},{"name":"karankhanna047","email":"karan.khanna047@gmail.com"}],"readme":"# Archiver\r\n\r\nA streaming interface for archive generation\r\n\r\nVisit the [API documentation](https://www.archiverjs.com/) for a list of all methods available.\r\n\r\n## Install\r\n\r\n```bash\r\nnpm install archiver --save\r\n```\r\n\r\n## Quick Start\r\n\r\n```js\r\nimport fs from \"fs\";\r\nimport { ZipArchive } from \"archiver\";\r\n\r\n// create a file to stream archive data to.\r\nconst output = fs.createWriteStream(__dirname + \"/example.zip\");\r\nconst archive = new ZipArchive({\r\n  zlib: { level: 9 }, // Sets the compression level.\r\n});\r\n\r\n// listen for all archive data to be written\r\n// 'close' event is fired only when a file descriptor is involved\r\noutput.on(\"close\", function () {\r\n  console.log(archive.pointer() + \" total bytes\");\r\n  console.log(\r\n    \"archiver has been finalized and the output file descriptor has closed.\",\r\n  );\r\n});\r\n\r\n// This event is fired when the data source is drained no matter what was the data source.\r\n// It is not part of this library but rather from the NodeJS Stream API.\r\n// @see: https://nodejs.org/api/stream.html#stream_event_end\r\noutput.on(\"end\", function () {\r\n  console.log(\"Data has been drained\");\r\n});\r\n\r\n// good practice to catch warnings (ie stat failures and other non-blocking errors)\r\narchive.on(\"warning\", function (err) {\r\n  if (err.code === \"ENOENT\") {\r\n    // log warning\r\n  } else {\r\n    // throw error\r\n    throw err;\r\n  }\r\n});\r\n\r\n// good practice to catch this error explicitly\r\narchive.on(\"error\", function (err) {\r\n  throw err;\r\n});\r\n\r\n// pipe archive data to the file\r\narchive.pipe(output);\r\n\r\n// append a file from stream\r\nconst file1 = __dirname + \"/file1.txt\";\r\narchive.append(fs.createReadStream(file1), { name: \"file1.txt\" });\r\n\r\n// append a file from string\r\narchive.append(\"string cheese!\", { name: \"file2.txt\" });\r\n\r\n// append a file from buffer\r\nconst buffer3 = Buffer.from(\"buff it!\");\r\narchive.append(buffer3, { name: \"file3.txt\" });\r\n\r\n// append a file\r\narchive.file(\"file1.txt\", { name: \"file4.txt\" });\r\n\r\n// append files from a sub-directory and naming it `new-subdir` within the archive\r\narchive.directory(\"subdir/\", \"new-subdir\");\r\n\r\n// append files from a sub-directory, putting its contents at the root of archive\r\narchive.directory(\"subdir/\", false);\r\n\r\n// append files from a glob pattern\r\narchive.glob(\"file*.txt\", { cwd: __dirname });\r\n\r\n// finalize the archive (ie we are done appending files but streams have to finish yet)\r\n// 'close', 'end' or 'finish' may be fired right after calling this method so register to them beforehand\r\narchive.finalize();\r\n```\r\n\r\n## Formats\r\n\r\nArchiver ships with out of the box support for TAR and ZIP archives.\r\n","readmeFilename":"README.md"}