ReferenceEncoding and crypto

zstddecompress

Decompresses a Zstandard frame into a byte string.

Syntax

zstddecompress(data: string) -> string

Also available as

crypt.zstddecompresszstd_decompress

Parameters

ParameterTypeDescription
datastringZstandard-compressed bytes.

Returns

TypeDescription
stringDecompressed bytes.

Description

Supports both frames with an embedded content size and streamed frames without a declared size, bounded at 64 MiB. Malformed or truncated compressed input raises an error.

Example

local original = "hello"
assert(zstddecompress(zstdcompress(original)) == original)

These are Game executor contracts. Check build requirements and session lifetimes before using them.