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

Compress

Streaming GZIP compression

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

§Constructors

§
new Compress(opts: GzipOptions, cb?: FlateStreamHandler)
[src]

Creates a GZIP stream

@param opts

The compression options

@param cb

The callback to call whenever data is deflated

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

Creates a GZIP 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 GZIPped output for small inputs.

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

Pushes a chunk to be GZIPped

@param chunk

The chunk to push

@param final

Whether this is the last chunk