import { zipcat } from 'https://raw.githubusercontent.com/kagis/zipcat/c2fc55f65f33c1576ae5cd9c6ed6e5999dc7f032/zipcat.js';
import { readableStreamFromIterable } from 'https://deno.land/std@0.144.0/streams/mod.ts';
await readableStreamFromIterable(zipcat(generate_zip_entries())).pipeTo(Deno.stdout.writable);
async function * generate_zip_entries() {
yield { name: 'one.txt', data: utf8enc('hello world\n') };
yield { name: 'two.txt', data: [utf8enc('lorem ipsum\n'), utf8enc('dolor sit amet\n')] };
const file = await Deno.open('/tmp/three.txt');
yield { name: 'three.txt', data: file.readable };
}
function utf8enc(s) {
return new TextEncoder().encode(s);
}
-
Notifications
You must be signed in to change notification settings - Fork 0
kagis/zipcat
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Catenates multiple byte-streams into zip-stream
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published