-
Notifications
You must be signed in to change notification settings - Fork 7
Documentation
abal edited this page Oct 23, 2017
·
1 revision
A generic wrapper for decompressing a stream of inflated or gzipped data.
-
options
{Object}-
chunkSize
{Number} - The size of each interally generated data chunk -
to
{String} - If "string", result will be a string. Otherwise, result will be a Buffer. -
windowBits
{Number} - The base two logarithm of the window size. See the zlib documentation for more information
-
The error code after finishing an inflate. This should be checked before grabbing the inflate result.
The error message, null if Inflate.err == 0.
The decompressed result, containing the result for all pushed chunks since the last flush.
-
data
{Buffer | Uint8Array} - Input data -
mode
{Boolean | Number} - The flush mode to use. Can be a number 0..6 corresponding to a flush constant,true
for Z_FINISH, or Z_NO_FLUSH otherwise
Inflates a chunk of input data. The last data chunk must have flush set to Z_FINISH to flush data from internal zlib buffers. For mid-stream flushes, Z_SYNC_FLUSH will flush existing data but keep the inflate context.