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

AsyncDeflate

Asynchronous streaming DEFLATE compression

class AsyncDeflate {
constructor(opts: DeflateOptions, cb?: AsyncFlateStreamHandler);
constructor(cb?: AsyncFlateStreamHandler);
queuedSize: number;
terminate: AsyncTerminable;
 
flush(): void;
push(chunk: Uint8Array, final?: boolean): void;
}

§Constructors

§
new AsyncDeflate(opts: DeflateOptions, cb?: AsyncFlateStreamHandler)
[src]

Creates an asynchronous DEFLATE stream

@param opts

The compression options

@param cb

The callback to call whenever data is deflated

§
new AsyncDeflate(cb?: AsyncFlateStreamHandler)
[src]

Creates an asynchronous DEFLATE stream

@param cb

The callback to call whenever data is deflated

§Properties

§

The handler to call whenever data is available

§

The handler to call whenever buffered source data is processed (i.e. queuedSize updates)

§
queuedSize: number
[src]

The number of uncompressed bytes buffered in the stream

§

A method to terminate the stream's internal worker. Subsequent calls to push() will silently fail.

§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