|
5 years ago | |
---|---|---|
.. | ||
interfaces | 5 years ago | |
README.md | 5 years ago |
Ƭ FlateCallback: (err: Error,data: Uint8Array) => unknown
Callback for asynchronous comrpession methods
param
Any error that occurred
param
The resulting data. Only present if err
is null
▸ decompress(data
: Uint8Array, opts
: AsyncInflateOptions, cb
: FlateCallback): void
Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
opts |
AsyncInflateOptions | The decompression options |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ decompress(data
: Uint8Array, cb
: FlateCallback): void
Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ decompressSync(data
: Uint8Array, out?
: Uint8Array): Uint8Array
Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
out? |
Uint8Array | Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. |
Returns: Uint8Array
▸ deflate(data
: Uint8Array, opts
: AsyncDeflateOptions, cb
: FlateCallback): void
Asynchronously compresses data with DEFLATE without any wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts |
AsyncDeflateOptions | The compression options |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ deflate(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously compresses data with DEFLATE without any wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ deflateSync(data
: Uint8Array, opts?
: DeflateOptions): Uint8Array
Compresses data with DEFLATE without any wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts? |
DeflateOptions | The compression options |
Returns: Uint8Array
▸ gunzip(data
: Uint8Array, opts
: AsyncGunzipOptions, cb
: FlateCallback): void
Asynchronously expands GZIP data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
opts |
AsyncGunzipOptions | The decompression options |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ gunzip(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously expands GZIP data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ gunzipSync(data
: Uint8Array, out?
: Uint8Array): Uint8Array
Expands GZIP data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
out? |
Uint8Array | Where to write the data. GZIP already encodes the output size, so providing this doesn't save memory. |
Returns: Uint8Array
▸ gzip(data
: Uint8Array, opts
: AsyncGzipOptions, cb
: FlateCallback): void
Asynchronously compresses data with GZIP
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts |
AsyncGzipOptions | The compression options |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ gzip(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously compresses data with GZIP
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ gzip(data
: Uint8Array, opts
: AsyncGzipOptions, cb
: FlateCallback): void
Asynchronously compresses data with GZIP
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts |
AsyncGzipOptions | The compression options |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ gzip(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously compresses data with GZIP
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ gzipSync(data
: Uint8Array, opts?
: GzipOptions): Uint8Array
Compresses data with GZIP
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts? |
GzipOptions | The compression options |
Returns: Uint8Array
▸ inflate(data
: Uint8Array, opts
: AsyncInflateOptions, cb
: FlateCallback): void
Asynchronously expands DEFLATE data with no wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
opts |
AsyncInflateOptions | The decompression options |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ inflate(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously expands DEFLATE data with no wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ inflateSync(data
: Uint8Array, out?
: Uint8Array): Uint8Array
Expands DEFLATE data with no wrapper
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
out? |
Uint8Array | Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. |
Returns: Uint8Array
▸ unzlib(data
: Uint8Array, opts
: AsyncGunzipOptions, cb
: FlateCallback): void
Asynchronously expands Zlib data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
opts |
AsyncGunzipOptions | The decompression options |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ unzlib(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously expands Zlib data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
cb |
FlateCallback | The function to be called upon decompression completion |
Returns: void
▸ unzlibSync(data
: Uint8Array, out?
: Uint8Array): Uint8Array
Expands Zlib data
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to decompress |
out? |
Uint8Array | Where to write the data. Saves memory if you know the decompressed size and provide an output buffer of that length. |
Returns: Uint8Array
▸ zlib(data
: Uint8Array, opts
: AsyncZlibOptions, cb
: FlateCallback): void
Asynchronously compresses data with Zlib
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts |
AsyncZlibOptions | The compression options |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ zlib(data
: Uint8Array, cb
: FlateCallback): void
Asynchronously compresses data with Zlib
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
cb |
FlateCallback | The function to be called upon compression completion |
Returns: void
▸ zlibSync(data
: Uint8Array, opts?
: ZlibOptions): Uint8Array
Compress data with Zlib
Name | Type | Description |
---|---|---|
data |
Uint8Array | The data to compress |
opts? |
ZlibOptions | The compression options |
Returns: Uint8Array