hayd / deno-zip

A JSZip wrapper for handling zipfiles in deno

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deno zip

A wrapper around JSZip for deno.

Usage:

Create zipfile:

import { JSZip } from "https://deno.land/x/jszip/mod.ts";

const zip = new JSZip();
zip.addFile("Hello.txt", "Hello World\n");

const img = zip.folder("images");
img.addFile("smile.gif", "\0", { base64: true });

await zip.writeZip("example.zip");

Read zipfile:

import { readZip } from "https://deno.land/x/jszip/mod.ts";

const zip = await readZip("example.zip");
for (const z of zip) {
  console.log(z.name);
}

console.log(await zip.file("Hello.txt").async("string"));
// "Hello World\n"

About

A JSZip wrapper for handling zipfiles in deno

License:MIT License


Languages

Language:TypeScript 100.0%