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

Deflate

Streaming DEFLATE compression

class Deflate {
constructor(opts: DeflateOptions, cb?: FlateStreamHandler);
constructor(cb?: FlateStreamHandler);
private b;
private o;
private p;
private s;
 
flush(): void;
push(chunk: Uint8Array, final?: boolean): void;
}

§Constructors

§
new Deflate(opts: DeflateOptions, cb?: FlateStreamHandler)
[src]

Creates a DEFLATE stream

@param opts

The compression options

@param cb

The callback to call whenever data is deflated

§
new Deflate(cb?: FlateStreamHandler)
[src]

Creates a DEFLATE 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 deflated output for small inputs.

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

Pushes a chunk to be deflated

@param chunk

The chunk to push

@param final

Whether this is the last chunk