Skip to content
Encoding & cryptographyReference

crypt.lz4decompress

Expand a raw LZ4 block.

Aliaseslz4decompresscrypt.base64.lz4decompress

Details#

Expand a raw LZ4 block. Original binary string. Invalid input or output exceeding 256 MiB raises an error.

Signature#

Luau
crypt.lz4decompress(data: string): string

Parameters#

ParameterTypeDescription
datastringBinary LZ4 block, for example from lz4compress.

Returns#

Original binary string. Invalid input or output exceeding 256 MiB raises an error.

Examples#

Local example

Luau
local original = "A local text sample"
assert(crypt.lz4decompress(crypt.lz4compress(original)) == original)