Syntax
lz4decompress(data: string, expectedSize?: number): stringAliases
crypt.lz4decompresscrypt.lz4.decompresslz4.decompressArguments
| Name | Type | Description |
|---|---|---|
data | string | Input byte string or text processed by the function. |
expectedSize? | number | Expected decompressed byte size used for validation. |
Returns
| Name | Type | Description |
|---|---|---|
decompressed | string | Decompressed byte string. |
Description
Decompresses an LZ4 string and optionally validates the expected decompressed size.
Call it with 2 parameter(s): data, expectedSize. The argument table explains which values are required and which ones only refine the behavior.
It returns decompressed (string). Use the returns table to separate successful values from nil results and recoverable errors.
Example
Example call with placeholder values.
local result = lz4decompress("example", 1)
print(result)