Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aslilac/unzzz
A lightweight ZIP archive reader using Web APIs
https://github.com/aslilac/unzzz
zip
Last synced: 3 months ago
JSON representation
A lightweight ZIP archive reader using Web APIs
- Host: GitHub
- URL: https://github.com/aslilac/unzzz
- Owner: aslilac
- License: mit
- Created: 2018-10-11T21:50:17.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2023-01-08T16:13:39.000Z (about 2 years ago)
- Last Synced: 2024-10-12T22:43:54.364Z (3 months ago)
- Topics: zip
- Language: TypeScript
- Homepage: https://aslilac.github.io/unzzz/
- Size: 812 KB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# unzzz
A lightweight package for reading .zip files, using native Web APIs like
`ArrayBuffer` and `DecompressionStream` and `Iterator`.It focuses on being lightweight and portable; working in modern browsers, Node, and Deno,
without any dependencies.## Usage
- [Documentation](https://aslilac.github.io/unzzz/)
```javascript
import unzzz from "unzzz";const archive = unzzz(await file.arrayBuffer());
for await (const archiveFile of archive) {
// Log the file name, and the first 10 bytes of each file in the archive
console.log(
archiveFile.fileName,
new Uint8Array(await archiveFile.arrayBuffer(), 0, 10),
);
}
```