Encoding & cryptographyReference
crypt.lz4compress
Compress bytes into a raw LZ4 block.
Aliases
lz4compresscrypt.base64.lz4compressDetails#
Compress bytes into a raw LZ4 block. Binary compressed block. This is not an LZ4 frame or Base64 string.
Signature#
crypt.lz4compress(data: string): stringParameters#
| Parameter | Type | Description |
|---|---|---|
data | string | Raw bytes; inputs larger than the signed int range are rejected. |
Returns#
Binary compressed block. This is not an LZ4 frame or Base64 string.
Examples#
Local example
local packed = crypt.lz4compress("notes notes notes")
print(crypt.lz4decompress(packed)) -- notes notes notes