{"id":19013002,"url":"https://github.com/archiverjs/node-zip-stream","last_synced_at":"2025-05-14T15:05:27.843Z","repository":{"id":12982900,"uuid":"15661700","full_name":"archiverjs/node-zip-stream","owner":"archiverjs","description":"a streaming zip archive generator","archived":false,"fork":false,"pushed_at":"2025-04-14T05:49:29.000Z","size":622,"stargazers_count":159,"open_issues_count":26,"forks_count":23,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-04-28T02:37:22.947Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://archiverjs.com/zip-stream","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/archiverjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-01-06T00:38:52.000Z","updated_at":"2025-01-24T06:37:13.000Z","dependencies_parsed_at":"2023-12-18T14:33:51.205Z","dependency_job_id":"c5685d0f-3746-4df3-bccf-a1ff1f6c036f","html_url":"https://github.com/archiverjs/node-zip-stream","commit_stats":{"total_commits":347,"total_committers":9,"mean_commits":38.55555555555556,"dds":"0.25360230547550433","last_synced_commit":"5dc0f9a5a8584cbdb292645f9bcf503da234ffd7"},"previous_names":[],"tags_count":52,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiverjs%2Fnode-zip-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiverjs%2Fnode-zip-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiverjs%2Fnode-zip-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/archiverjs%2Fnode-zip-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/archiverjs","download_url":"https://codeload.github.com/archiverjs/node-zip-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252569641,"owners_count":21769516,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T19:21:15.384Z","updated_at":"2025-05-14T15:05:27.806Z","avatar_url":"https://github.com/archiverjs.png","language":"JavaScript","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"# ZipStream\n\nzip-stream is a streaming zip archive generator based on the `ZipArchiveOutputStream` prototype found in the [compress-commons](https://www.npmjs.org/package/compress-commons) project.\n\nIt was originally created to be a successor to [zipstream](https://npmjs.org/package/zipstream).\n\nVisit the [API documentation](http://archiverjs.com/zip-stream) for a list of all methods available.\n\n### Install\n\n```bash\nnpm install zip-stream --save\n```\n\nYou can also use `npm install https://github.com/archiverjs/node-zip-stream/archive/master.tar.gz` to test upcoming versions.\n\n### Usage\n\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\".\n\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.\n\n```js\nimport { ZipStream } from \"zip-stream\":\nconst archive = new ZipStream(); // OR new ZipStream(options)\n\narchive.on(\"error\", function (err) {\n  throw err;\n});\n\n// pipe archive where you want it (ie fs, http, etc)\n// listen to the destination's end, close, or finish event\n\narchive.entry(\"string contents\", { name: \"string.txt\" }, function (err, entry) {\n  if (err) throw err;\n  archive.entry(null, { name: \"directory/\" }, function (err, entry) {\n    if (err) throw err;\n    archive.finish();\n  });\n});\n```\n\n## Credits\n\nConcept inspired by Antoine van Wel's [zipstream](https://npmjs.org/package/zipstream) module, which is no longer being updated.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchiverjs%2Fnode-zip-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farchiverjs%2Fnode-zip-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farchiverjs%2Fnode-zip-stream/lists"}