{"id":19686692,"url":"https://github.com/tinovyatkin/zip-store-stream","last_synced_at":"2025-04-29T06:31:31.501Z","repository":{"id":42066368,"uuid":"262081862","full_name":"tinovyatkin/zip-store-stream","owner":"tinovyatkin","description":"Creates a readable stream of ZIP file with no compression out of given files, streams or buffers","archived":false,"fork":false,"pushed_at":"2023-11-07T23:34:36.000Z","size":435,"stargazers_count":5,"open_issues_count":14,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-19T17:18:42.374Z","etag":null,"topics":["compression","nodejs","streams","zip"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tinovyatkin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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":"2020-05-07T15:02:38.000Z","updated_at":"2023-04-28T07:37:51.000Z","dependencies_parsed_at":"2022-08-12T03:51:05.456Z","dependency_job_id":"cb0cd623-9a4a-40d7-ad8d-c2f52d577ee4","html_url":"https://github.com/tinovyatkin/zip-store-stream","commit_stats":null,"previous_names":["walletpass/zip-store-stream"],"tags_count":3,"template":false,"template_full_name":"tinovyatkin/typescript-repo-template","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fzip-store-stream","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fzip-store-stream/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fzip-store-stream/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tinovyatkin%2Fzip-store-stream/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tinovyatkin","download_url":"https://codeload.github.com/tinovyatkin/zip-store-stream/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251450656,"owners_count":21591407,"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":["compression","nodejs","streams","zip"],"created_at":"2024-11-11T18:29:51.445Z","updated_at":"2025-04-29T06:31:30.369Z","avatar_url":"https://github.com/tinovyatkin.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zip-store-stream [![codecov](https://codecov.io/gh/walletpass/zip-store-stream/branch/master/graph/badge.svg)](https://codecov.io/gh/walletpass/zip-store-stream) [![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=zip-store-stream\u0026metric=sqale_rating)](https://sonarcloud.io/dashboard?id=zip-store-stream)\n\nHighly optimized Node.JS library to create in-memory ZIP archive (as Readable stream and without compression) from given strings, Buffers or streams.\nStoring without compression is fast and in many cases is enough, if you just want to bundle some files together (as our use case for Apple Wallet `.pkpass` files, which consists mostly of already compressed PNG files)\n\n## Motivation\n\nThere are tons of ZIP creating libraries on NPM, however, none of them is optimized for speed, memory and asynchronism point of view and I was needed a way to generate ZIP archives (Apple Wallet Passes) at scale of about 50000 RPS.\n\nThis library:\n\n- Generates ZIP archive in memory and returns stream to be piped into a file, HTTPS response, etc.\n- Works with strings, buffers or readable streams as file sources.\n- Starts pushing data as soon as possible to decrease response latency.\n- Pushes in small chunks, file by file, to improve message loop flowing.\n- Uses super-fast [@node-rs/crc32](https://github.com/Brooooooklyn/node-rs/blob/master/packages/crc32/README.md#performance) Rust-powered library for CRC32 calculation.\n- Uses native Node.JS Buffer and efficient multi-bytes writing functions (`writeUInt16LE` / `writeUInt32LE`) for archive structure building.\n\nWritten in TypeScript, 100% test coverage.\n\n```ts\nimport { ZipStoreStream } from 'zip-store-stream';\n\nconst FILENAME = 'test-mixed.zip';\n\nconst zip = new ZipStoreStream([\n  { path: 'string.txt', data: 'Hello world!' },\n  { path: 'buffer.bin', data: randomBytes(10000) },\n  {\n    path: 'stream.ts',\n    data: createReadStream(__filename, { encoding: 'utf8' }),\n  },\n]);\nawait pipeline(zip, createWriteStream(FILENAME));\n```\n\n```sh\nunzip -v test-mixed.zip\n\n    Length   Method    Size  Cmpr    Date    Time   CRC-32   Name\n--------  ------  ------- ---- ---------- -----     -------- ----\n        12  Stored       12   0% 00-00-1980 00:00 1b851995  string.txt\n    10000   Stored    10000   0% 00-00-1980 00:00 983c6c5a  buffer.bin\n    3472    Stored     3472   0% 00-00-1980 00:00 f21cdbc5  stream.ts\n--------          -------  ---                               -------\n    13484            13484   0%                            3 files\n\n```\n\n## Author and License\n\nMIT licensed by Konstantin Vyatkin \u003ctino@vtkn.io\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinovyatkin%2Fzip-store-stream","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftinovyatkin%2Fzip-store-stream","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftinovyatkin%2Fzip-store-stream/lists"}