Class Zlib
Index
Constructors
constructor
Creates a Zlib stream
Parameters
- opts: ZlibOptions
The compression options
Optionalcb: FlateStreamHandlerThe callback to call whenever data is deflated
Returns Zlib
- opts: ZlibOptions
Creates a Zlib stream
Parameters
Optionalcb: FlateStreamHandlerThe callback to call whenever data is deflated
Returns Zlib
Methods
flush
Flushes buffered uncompressed data. Useful to immediately retrieve the zlibbed output for small inputs.
Returns void
push
Pushes a chunk to be zlibbed
Parameters
- chunk: Uint8Array
The chunk to push
Optionalfinal: booleanWhether this is the last chunk
Returns void
- chunk: Uint8Array
Streaming Zlib compression