Thanks to visit codestin.com
Credit goes to github.com

Skip to content
/ unz Public

A lightweight and portable library for reading ZIP archives

License

Notifications You must be signed in to change notification settings

aslilac/unz

Repository files navigation

unz

A lightweight package for reading ZIP files, using native Web APIs like ArrayBuffer and DecompressionStream. It's lightweight (about 2KB compressed) and works in all modern browsers, Node, and Deno, without any dependencies.

Usage

import unz from "unz";

// Log the file name and the first 10 bytes of every file in the ZIP archive.
const archive = unz(await file.arrayBuffer());
for (const [fileName, archiveFile] of archive) {
	console.log(fileName, new Uint8Array(await archiveFile.arrayBuffer(), 0, 10));
}

About

A lightweight and portable library for reading ZIP archives

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project