Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

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),
);
}
```