@statesync/persistence / lzDecompress
Function: lzDecompress()
ts
function lzDecompress(compressed): string;Defined in: persistence/src/compression.ts:86
Decompress a string that was previously compressed with lzCompress.
Parameters
| Parameter | Type | Description |
|---|---|---|
compressed | string | The compressed string to decompress. Returns an empty string if input is falsy. |
Returns
string
The original uncompressed string.
Throws
If the compressed data is invalid or corrupt.
Example
typescript
const original = lzDecompress(compressed);