unzzz
TypeScript icon, indicating that this package has built-in type declarations

0.12.1 • Public • Published

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

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

Package Sidebar

Install

npm i unzzz

Weekly Downloads

1

Version

0.12.1

License

MIT

Unpacked Size

228 kB

Total Files

121

Last publish

Collaborators

  • partheseas