Skip to main content
Module

x/zipjs/index.d.ts>ZipReaderStream

JavaScript library to zip and unzip files supporting multi-core compression, compression streams, zip64, split files and encryption.
Go to Latest
class ZipReaderStream
import { ZipReaderStream } from "https://deno.land/x/zipjs@v2.7.42/index.d.ts";

Represents an instance used to create an unzipped stream.

Examples

This example will take a zip file, decompress it and then recompress each file in it, saving it to disk.

for await (const entry of (await fetch(urlToZippedFile)).body.pipeThrough(new ZipWriterStream()))
  if (entry.readable) {
    console.log(entry.filename)
    entry.readable
      .pipeThrough(ZipReaderStream().transform(entry.filename))
      .pipeTo((await Deno.create(entry.filename + '.zip')).writable)
  }

Constructors

new
ZipReaderStream(options?: ZipReaderConstructorOptions)

Creates the stream.

Properties

readable: ReadableStream<Omit<Entry, "getData"> & { readable?: ReadableStream<Uint8Array>; }>

The readable stream.

writable: WritableStream<T>

The writable stream.