Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

Zlib

Streaming Zlib compression

class Zlib {
constructor(opts: ZlibOptions, cb?: FlateStreamHandler);
constructor(cb?: FlateStreamHandler);
private c;
private o;
private p;
private s;
private v;
 
flush(): void;
push(chunk: Uint8Array, final?: boolean): void;
}

§Constructors

§
new Zlib(opts: ZlibOptions, cb?: FlateStreamHandler)
[src]

Creates a Zlib stream

@param opts

The compression options

@param cb

The callback to call whenever data is deflated

§

Creates a Zlib stream

@param cb

The callback to call whenever data is deflated

§Properties

§

The handler to call whenever data is available

§Methods

§
flush(): void
[src]

Flushes buffered uncompressed data. Useful to immediately retrieve the zlibbed output for small inputs.

§
push(chunk: Uint8Array, final?: boolean): void
[src]

Pushes a chunk to be zlibbed

@param chunk

The chunk to push

@param final

Whether this is the last chunk