Encoding
Convert byte strings to and from Base64, or compress them with LZ4 and Zstandard. Decoding and decompression return raw bytes as Luau strings.
Functions
base64decodeRecover the original byte string from a standard Base64 value. This is useful after reading binary content from a JSON document or receiving it through a text-only endpoint.
base64encodeTurn arbitrary bytes into Base64 text. Use this when a JSON field, clipboard value, or other text-only channel needs to carry data that may contain zero bytes or nonprintable characters.
lz4compressPack a byte string as an LZ4 block for fast storage or transfer. It works best when the input contains repeated material; short inputs can grow instead of shrinking.
lz4decompressExpand an LZ4 block previously produced by lz4compress. Supply a capacity when the source is untrusted or your script has a known maximum document size.
zstdcompressCompress bytes with Zstandard, which is useful for saved data or transfers where compact output matters more than the quickest encode. Pass a level only when you need to tune the compression work.
zstddecompressRestore data stored in a Zstandard frame. This is the counterpart to zstdcompress, so it belongs at the read side of a Zstandard-backed file or message.