A library for creating and extracting ZIP archives.
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));
}