Refer to lua-lz4 for documentation. Quick example:
function init(self)
local s = "LZ4 is a very fast compression and decompression algorithm."
print("Original: " .. s)
local compressed = lz4.block_compress(s)
print("Compressed: " .. compressed)
local decompressed = lz4.block_decompress_safe(compressed, #s)
print("Decompressed: " .. decompressed)
end
We use this extension, and in the past few days our Github automated testing builds that run on linux have started breaking with the errors below. We didn’t switch Defold version, and we stayed on v1.1 of defold-lz4.
Has there been a change in the extender that could’ve caused this? The change occurred some time between 20th-23rd November.
/defold-lz4/src/lz4.c Line 248: In file included from upload/defold-lz4/src/lz4hc.c:65: ISO C++17 does not allow 'register' storage class specifier [-Wregister] 248 | static unsigned LZ4_NbCommonBytes (register size_t val)
com.defold.extender.ExtenderException: java.io.IOException: clang++: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated [-Wdeprecated]
Defold updated to Clang 17 which broke the old version of LZ4 that the extension used. I’ve updated everything on the main branch to try and fix it. Let me know if that works for you now and I’ll make a new release.