@quentinadam/zip
v0.1.10
Published
A library for creating and extracting ZIP archives
Downloads
210
Readme
@quentinadam/zip
A library for creating and extracting ZIP archives.
Usage
import * as zip from '@quentinadam/zip';
const files = [
{ name: 'hello.txt', data: new TextEncoder().encode('hello world') },
{ name: 'ipsum/lorem.txt', data: new TextEncoder().encode('ipsum lorem') },
];
const buffer = await zip.create(files);
for (const { name, data } of await zip.extract(buffer)) {
console.log(name, new TextDecoder().decode(data));
}