# zip [JSR](https://jsr.io/@mary/zip) | [source code](https://tangled.sh/@mary.my.id/pkg-zip) streaming zip archiver/extractor ```ts import { unzip, zip } from '@mary/zip'; import { fromFsFile } from '@mary/zip/deno'; // creating an archive { const stream = ReadableStream.from( zip([ { filename: 'README.md', data: `Hello, **world**!\n` }, { filename: 'mod.ts', data: `console.log("Hello");\n` }, ]), ); await Deno.writeFile('./archive.zip', stream); } // extracting a specific file from an archive { using file = await Deno.open('./archive.zip'); const reader = await fromFsFile(file); for await (const entry of unzip(reader)) { console.log(entry.filename, entry.size); if (entry.filename === 'mod.ts') { console.log(await entry.text()); } } } ```