{"id":22356338,"url":"https://github.com/do-/unzippo","last_synced_at":"2026-02-18T19:31:52.268Z","repository":{"id":43978552,"uuid":"246511938","full_name":"do-/unzippo","owner":"do-","description":"One-liner approach to safely read streams from zip files","archived":false,"fork":false,"pushed_at":"2025-02-15T09:25:54.000Z","size":577,"stargazers_count":0,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-25T17:50:18.768Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/do-.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,"zenodo":null}},"created_at":"2020-03-11T08:13:07.000Z","updated_at":"2025-02-15T09:25:57.000Z","dependencies_parsed_at":"2025-04-12T19:07:07.756Z","dependency_job_id":"1ae76c26-bf7a-4843-93ed-29bc55862f6d","html_url":"https://github.com/do-/unzippo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/do-/unzippo","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Funzippo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Funzippo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Funzippo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Funzippo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/do-","download_url":"https://codeload.github.com/do-/unzippo/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/do-%2Funzippo/sbom","scorecard":{"id":348899,"data":{"date":"2025-08-11","repo":{"name":"github.com/do-/unzippo","commit":"b13e40f4333646320ddef9805adced52d17715d6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.2,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:7: update your workflow using https://app.stepsecurity.io/secureworkflow/do-/unzippo/main.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/do-/unzippo/main.yml/master?enable=pin","Warn: npmCommand not pinned by hash: .github/workflows/main.yml:10","Info:   0 out of   1 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   1 npmCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 0/8 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":8,"reason":"2 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-968p-4wvh-cqc8","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-18T07:49:19.093Z","repository_id":43978552,"created_at":"2025-08-18T07:49:19.094Z","updated_at":"2025-08-18T07:49:19.094Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29591917,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T18:54:29.675Z","status":"ssl_error","status_checked_at":"2026-02-18T18:50:50.517Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-12-04T14:09:56.320Z","updated_at":"2026-02-18T19:31:52.228Z","avatar_url":"https://github.com/do-.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"![workflow](https://github.com/do-/unzippo/actions/workflows/main.yml/badge.svg)\n![Jest coverage](./badges/coverage-jest%20coverage.svg)\n\n`unzippo` is a thin wrapper around [`node-stream-zip`](https://www.npmjs.com/package/node-stream-zip) that does all the actual job. The only thing the present module provides is a procedural API for atomic operations. \n\n_Atomic_ here means a zip file is opened, its central directory is read and then the resources are disposed for each separate call. In most cases, this cause no significant overhead but allows to write simpler, cleaner code.\n\nSince the [async API](https://www.npmjs.com/package/node-stream-zip#async-api) is implemented by the original `node-stream-zip`, there is little sense left to wrap it any more.\n\nStill, one may prefer to use one liners instead of coping with the [mandatory](https://www.npmjs.com/package/node-stream-zip#async-api:~:text=//%20Do%20not%20forget%20to%20close%20the%20file%20once%20you%27re%20done%0Aawait%20zip.close()%3B) asynchronous `.close()`.\n\n## Installation\n\n```\nnpm install unzippo\n```\n\n## Basic usage\n\n```js\nconst zip = require ('unzippo')\n\nconst entries = await zip.list ('/some/archive.zip')\n\n(await zip.open ('/some/archive.zip', 'logs/access.log')).pipe (process.stdout)\n\nconst txt   = await zip.read ('/some/archive.zip', 'README.txt')\nconst wenzi = await zip.read ('/some/archive.zip', 'README.txt.zh', 'ucs2')\n\nconst buf   = await zip.get  ('/some/archive.zip', 'images/0.gif')\n```\n\n## Listing the archive content\n\n```js\nconst entries = await zip.list (zipFileName)\n```\n\nreturns exactly the same data structure as `node-stream-zip`'s `zip.entries()`: \n\n```\n{\n  '/path/to/someEntry': {\n    name: '/path/to/someEntry', // same as the key\n    size: 354354,               // uncompressed, bytes\n    ...,                        // technical info\n  },\n  ...                           // other entries\n}\n```\n\n## Extracting a file as a stream\n\n```js\nconst in = await zip.open (zipFileName, entryPath) // .pipe (myXform)...\n```\n\nreturns the binary readable stream corresponding to `entryPath` inside `zipFileName`.\n\nThis is the preferred, recommended way to read files from zip archives as it causes no memory related risk.\n\n## Reading a whole file\n\nFor a small file, it may be acceptable to read it at once, in form of `Buffer`:\n\n```js\nconst buf = await zip.get (zipFileName, entryPath)\n```\n\nIn most cases, such files have text content, so it's handier to have it as a `String`:\n\n```js\nconst txt = await zip.read (zipFileName, entryPath) // utf8\nconst txt = await zip.read (zipFileName, entryPath, encoding)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-%2Funzippo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdo-%2Funzippo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdo-%2Funzippo/lists"}