lz4decompress
Decompresses a raw LZ4 block.
Syntax
Signature
lz4decompress(Data: string, Size: number) -> stringAliases
crypt.lz4decompress
Parameters
| Parameter | Type | Description |
|---|---|---|
Data | string | Raw LZ4 block. |
Size | number | Exact uncompressed byte count from 0 through 16777216. |
Returns
| Type | Description |
|---|---|
string | Uncompressed bytes. |
Notes
Compressed input is limited to 32 MiB and output to 16 MiB. Raises an error if decoding fails or the decoded size differs from Size.
Example
Luau
local Text = "hello hello hello"
local Compressed = lz4compress(Text)
print(lz4decompress(Compressed, #Text))