/deno-zip

Primary LanguageTypeScript

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