{"id":23763717,"url":"https://github.com/tomashubelbauer/node-extract-zip","last_synced_at":"2026-05-17T01:36:54.557Z","repository":{"id":107986195,"uuid":"551067017","full_name":"TomasHubelbauer/node-extract-zip","owner":"TomasHubelbauer","description":"A pure Node function for extracting single-file ZIP archives","archived":false,"fork":false,"pushed_at":"2022-10-13T20:10:58.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-01T16:40:30.734Z","etag":null,"topics":["deflate","esm","node","zip"],"latest_commit_sha":null,"homepage":"https://tomashubelbauer.github.io/node-extract-zip/index.js","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/TomasHubelbauer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null}},"created_at":"2022-10-13T19:36:33.000Z","updated_at":"2022-10-13T19:54:29.000Z","dependencies_parsed_at":null,"dependency_job_id":"f48987ff-4434-4ee6-9d86-a4f29b18d887","html_url":"https://github.com/TomasHubelbauer/node-extract-zip","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/TomasHubelbauer/node-extract-zip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-extract-zip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-extract-zip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-extract-zip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-extract-zip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TomasHubelbauer","download_url":"https://codeload.github.com/TomasHubelbauer/node-extract-zip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TomasHubelbauer%2Fnode-extract-zip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267046466,"owners_count":24026904,"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","status":"online","status_checked_at":"2025-07-25T02:00:09.625Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["deflate","esm","node","zip"],"created_at":"2024-12-31T22:13:21.919Z","updated_at":"2026-05-17T01:36:49.508Z","avatar_url":"https://github.com/TomasHubelbauer.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Node Extract Single-File ZIP Archive\n\n[![pages-build-deployment](https://github.com/TomasHubelbauer/node-extract-zip/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/TomasHubelbauer/node-extract-zip/actions/workflows/pages/pages-build-deployment)\n\nThe following snippet of code implements a function which will take a `Buffer`\nof a ZIP archive file contents and find a single deflated file inside, which it\nwill then inflate and return the result as another `Buffer`.\n\nIt works by first looking for the EOCD (end of central directory) entry, from it\nidentifying the corresponding CD (central directory) entry and from it the data\nsize and offset of the DEFLATE stream.\nThe stream is then fed into `zlib` Node built-in module's function `inflateRaw`.\n\nThe implementation can be found in [`index.js`](index.js) or referenced via ESM\nHTTP imports if you use the experimental `--experimental-network-imports` CLI\nflag.\n\n```javascript\nimport extract from 'https://tomashubelbauer.github.io/node-extract-zip/index.js';\n\nconst buffer = await extract(await fs.promises.readFile('archive.zip'));\nconst text = buffer.toString();\nconst data = JSON.parse(buffer);\n```\n\nThis repository has an associated GitHub Pages site.\nThis is so that `index.js` can be accessed with a correct MIME type to be usable\nwith ESM.\nThe badge at the top relates to the GitHub Actions workflow for GitHub Pages.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fnode-extract-zip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomashubelbauer%2Fnode-extract-zip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomashubelbauer%2Fnode-extract-zip/lists"}