Class Zlib
Index
Constructors
constructor
- new Zlib(opts: ZlibOptions, cb?: FlateStreamHandler): Zlib
Creates a Zlib stream
Parameters
- opts: ZlibOptions
The compression options
Optional
cb: FlateStreamHandlerThe callback to call whenever data is deflated
Returns Zlib
- opts: ZlibOptions
- new Zlib(cb?: FlateStreamHandler): Zlib
Creates a Zlib stream
Parameters
Optional
cb: FlateStreamHandlerThe callback to call whenever data is deflated
Returns Zlib
Methods
flush
push
- push(chunk: Uint8Array<ArrayBufferLike>, final?: boolean): void
Pushes a chunk to be zlibbed
Parameters
- chunk: Uint8Array<ArrayBufferLike>
The chunk to push
Optional
final: booleanWhether this is the last chunk
Returns void
- chunk: Uint8Array<ArrayBufferLike>
Streaming Zlib compression