Skip to content

Latest commit

 

History

History
23 lines (16 loc) · 679 Bytes

README.md

File metadata and controls

23 lines (16 loc) · 679 Bytes

zip

JSR CI

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