LZ4 library for LuaJIT (FFI Binding)
Version | LuaJIT 2.0 | LuaJIT 2.1 (OpenResty) |
---|---|---|
lz4 v1.9.3 | ✓ | ✓ |
lz4 v1.8.3 | ✓ | ✓ |
lz4 v1.7.5 | ✓ | ✓ |
lz4 r131 | ✓ | ✓ |
local lz4 = require("lz4")
local data = "hello lz4"
local errmsg, compressed_data, decompressed_data
compressed_data, errmsg = lz4.compress(data)
decompressed_data, errmsg = lz4.decompress(compressed_data)
assert(decompressed_data == data)
local compressed_data, errmsg = lz4.compress(data, compression_level)
local decompressed_data, errmsg = lz4.decompress(compressed_data)
Copyright (c) 2014-2021 Cheyi Lin. MIT licensed. See LICENSE for details.