|
@@ -4,25 +4,85 @@
|
|
|
|
|
|
### Interfaces
|
|
|
|
|
|
+* [AsyncDeflateOptions](interfaces/asyncdeflateoptions.md)
|
|
|
+* [AsyncGunzipOptions](interfaces/asyncgunzipoptions.md)
|
|
|
+* [AsyncGzipOptions](interfaces/asyncgzipoptions.md)
|
|
|
+* [AsyncInflateOptions](interfaces/asyncinflateoptions.md)
|
|
|
+* [AsyncUnzlibOptions](interfaces/asyncunzliboptions.md)
|
|
|
+* [AsyncZlibOptions](interfaces/asynczliboptions.md)
|
|
|
* [DeflateOptions](interfaces/deflateoptions.md)
|
|
|
-* [GZIPOptions](interfaces/gzipoptions.md)
|
|
|
+* [GzipOptions](interfaces/gzipoptions.md)
|
|
|
* [ZlibOptions](interfaces/zliboptions.md)
|
|
|
|
|
|
+### Type aliases
|
|
|
+
|
|
|
+* [FlateCallback](README.md#flatecallback)
|
|
|
+
|
|
|
### Functions
|
|
|
|
|
|
* [decompress](README.md#decompress)
|
|
|
+* [decompressSync](README.md#decompresssync)
|
|
|
* [deflate](README.md#deflate)
|
|
|
+* [deflateSync](README.md#deflatesync)
|
|
|
* [gunzip](README.md#gunzip)
|
|
|
+* [gunzipSync](README.md#gunzipsync)
|
|
|
* [gzip](README.md#gzip)
|
|
|
+* [gzipSync](README.md#gzipsync)
|
|
|
* [inflate](README.md#inflate)
|
|
|
+* [inflateSync](README.md#inflatesync)
|
|
|
* [unzlib](README.md#unzlib)
|
|
|
+* [unzlibSync](README.md#unzlibsync)
|
|
|
* [zlib](README.md#zlib)
|
|
|
+* [zlibSync](README.md#zlibsync)
|
|
|
+
|
|
|
+## Type aliases
|
|
|
+
|
|
|
+### FlateCallback
|
|
|
+
|
|
|
+Ƭ **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
|
|
|
|
|
|
## Functions
|
|
|
|
|
|
### decompress
|
|
|
|
|
|
-▸ **decompress**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
+▸ **decompress**(`data`: Uint8Array, `opts`: [AsyncInflateOptions](interfaces/asyncinflateoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`opts` | [AsyncInflateOptions](interfaces/asyncinflateoptions.md) | The decompression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **decompress**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchrononously expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### decompressSync
|
|
|
+
|
|
|
+▸ **decompressSync**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
|
|
|
Expands compressed GZIP, Zlib, or raw DEFLATE data, automatically detecting the format
|
|
|
|
|
@@ -39,7 +99,38 @@ ___
|
|
|
|
|
|
### deflate
|
|
|
|
|
|
-▸ **deflate**(`data`: Uint8Array, `opts?`: [DeflateOptions](interfaces/deflateoptions.md)): Uint8Array
|
|
|
+▸ **deflate**(`data`: Uint8Array, `opts`: [AsyncDeflateOptions](interfaces/asyncdeflateoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with DEFLATE without any wrapper
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`opts` | [AsyncDeflateOptions](interfaces/asyncdeflateoptions.md) | The compression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **deflate**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with DEFLATE without any wrapper
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### deflateSync
|
|
|
+
|
|
|
+▸ **deflateSync**(`data`: Uint8Array, `opts?`: [DeflateOptions](interfaces/deflateoptions.md)): Uint8Array
|
|
|
|
|
|
Compresses data with DEFLATE without any wrapper
|
|
|
|
|
@@ -56,7 +147,38 @@ ___
|
|
|
|
|
|
### gunzip
|
|
|
|
|
|
-▸ **gunzip**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
+▸ **gunzip**(`data`: Uint8Array, `opts`: [AsyncGunzipOptions](interfaces/asyncgunzipoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands GZIP data
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`opts` | [AsyncGunzipOptions](interfaces/asyncgunzipoptions.md) | The decompression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **gunzip**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands GZIP data
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### gunzipSync
|
|
|
+
|
|
|
+▸ **gunzipSync**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
|
|
|
Expands GZIP data
|
|
|
|
|
@@ -73,7 +195,65 @@ ___
|
|
|
|
|
|
### gzip
|
|
|
|
|
|
-▸ **gzip**(`data`: Uint8Array, `opts?`: [GZIPOptions](interfaces/gzipoptions.md)): Uint8Array
|
|
|
+▸ **gzip**(`data`: Uint8Array, `opts`: [AsyncGzipOptions](interfaces/asyncgzipoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with GZIP
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`opts` | [AsyncGzipOptions](interfaces/asyncgzipoptions.md) | The compression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **gzip**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with GZIP
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **gzip**(`data`: Uint8Array, `opts`: [AsyncGzipOptions](interfaces/asyncgzipoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with GZIP
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`opts` | [AsyncGzipOptions](interfaces/asyncgzipoptions.md) | The compression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **gzip**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with GZIP
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### gzipSync
|
|
|
+
|
|
|
+▸ **gzipSync**(`data`: Uint8Array, `opts?`: [GzipOptions](interfaces/gzipoptions.md)): Uint8Array
|
|
|
|
|
|
Compresses data with GZIP
|
|
|
|
|
@@ -82,7 +262,7 @@ Compresses data with GZIP
|
|
|
Name | Type | Description |
|
|
|
------ | ------ | ------ |
|
|
|
`data` | Uint8Array | The data to compress |
|
|
|
-`opts?` | [GZIPOptions](interfaces/gzipoptions.md) | The compression options |
|
|
|
+`opts?` | [GzipOptions](interfaces/gzipoptions.md) | The compression options |
|
|
|
|
|
|
**Returns:** Uint8Array
|
|
|
|
|
@@ -90,7 +270,38 @@ ___
|
|
|
|
|
|
### inflate
|
|
|
|
|
|
-▸ **inflate**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
+▸ **inflate**(`data`: Uint8Array, `opts`: [AsyncInflateOptions](interfaces/asyncinflateoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands DEFLATE data with no wrapper
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`opts` | [AsyncInflateOptions](interfaces/asyncinflateoptions.md) | The decompression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **inflate**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands DEFLATE data with no wrapper
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### inflateSync
|
|
|
+
|
|
|
+▸ **inflateSync**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
|
|
|
Expands DEFLATE data with no wrapper
|
|
|
|
|
@@ -107,7 +318,38 @@ ___
|
|
|
|
|
|
### unzlib
|
|
|
|
|
|
-▸ **unzlib**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
+▸ **unzlib**(`data`: Uint8Array, `opts`: [AsyncGunzipOptions](interfaces/asyncgunzipoptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands Zlib data
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`opts` | [AsyncGunzipOptions](interfaces/asyncgunzipoptions.md) | The decompression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **unzlib**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously expands Zlib data
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to decompress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon decompression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### unzlibSync
|
|
|
+
|
|
|
+▸ **unzlibSync**(`data`: Uint8Array, `out?`: Uint8Array): Uint8Array
|
|
|
|
|
|
Expands Zlib data
|
|
|
|
|
@@ -124,7 +366,38 @@ ___
|
|
|
|
|
|
### zlib
|
|
|
|
|
|
-▸ **zlib**(`data`: Uint8Array, `opts?`: [ZlibOptions](interfaces/zliboptions.md)): Uint8Array
|
|
|
+▸ **zlib**(`data`: Uint8Array, `opts`: [AsyncZlibOptions](interfaces/asynczliboptions.md), `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with Zlib
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`opts` | [AsyncZlibOptions](interfaces/asynczliboptions.md) | The compression options |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+▸ **zlib**(`data`: Uint8Array, `cb`: [FlateCallback](README.md#flatecallback)): void
|
|
|
+
|
|
|
+Asynchronously compresses data with Zlib
|
|
|
+
|
|
|
+#### Parameters:
|
|
|
+
|
|
|
+Name | Type | Description |
|
|
|
+------ | ------ | ------ |
|
|
|
+`data` | Uint8Array | The data to compress |
|
|
|
+`cb` | [FlateCallback](README.md#flatecallback) | The function to be called upon compression completion |
|
|
|
+
|
|
|
+**Returns:** void
|
|
|
+
|
|
|
+___
|
|
|
+
|
|
|
+### zlibSync
|
|
|
+
|
|
|
+▸ **zlibSync**(`data`: Uint8Array, `opts?`: [ZlibOptions](interfaces/zliboptions.md)): Uint8Array
|
|
|
|
|
|
Compress data with Zlib
|
|
|
|