👨‍💻 about me home CV/Resume 🖊️ Contact Github LinkedIn I’m a Haskeller 📝 Blog Freedom, privacy, tutorials… 🏆 Best of Fizzbuzz LuaX Calculadoira panda upp Haskell todo pwd TPG Nextcloud Git

#BoycottQatar2022   ┇   Why everyone should boycott the World Cup in Qatar

🆕 since August 2022: LuaX is a Lua eXtended interpretor/cross compiler providing a bunch of useful modules (statically linked, no dependency). Nice integration with upp (new functions and modules available to extend upp macros) and also with a soon released but yet confidential project about actor oriented programming!
💣 Kick GAFAMs out (✔️ ǝlƃooפ, ✔️ ʞooqǝɔɐℲ, ✔️ uozɐɯ∀): Stop giving our soul and money to evils, be free and respectful!
📰 Friday 2. April 2021: upp is a panda companion. It’s a Lua-scriptable lightweight text preprocessor.
🆕 since December 2020: Playing with the actor model in an embedded multicore context. C imperative components become C stream pure functions with no side effect ➡️ C low level programming with high level pure functional programming properties 🏆
📰 Saturday 30. January 2021: Playing with Pandoc Lua filters in Lua. panda is a lightweight alternative to abp providing a consistent set of Pandoc filters (text substitution, file inclusion, diagrams, scripts, …).
🆕 Sunday 24. May 2020: Working at EasyMile for more than 5 years. Critical real-time software in C, simulation and monitoring in Haskell ➡️ perfect combo! It’s efficient and funny ;-)

LuaX: Lua eXtended

Christophe Delord - http://cdelord.fr/luax

lz4: Extremely Fast Compression algorithm

local lz4 = require "lz4"

LZ4 is an extremely fast compression algorithm by Yann Collet.

The source code in on Github: https://github.com/lz4/lz4.

More information on https://www.lz4.org.

LZ4 compression preferences

The compression preferences are hard coded and not configurable:

LZ4 frame compression


compresses data with LZ4 (highest compression level). The compressed data is an LZ4 frame that can be stored in a file and decompressed by the lz4 command line utility.

LZ4 frame decompression


decompresses data with LZ4. data shall be an LZ4 frame and can be the content of a file produced by the lz4 command line utility.

String methods

The lz4 functions are also available as string methods:

s:lz4()         == lz4.lz4(s)
s:unlz4()       == lz4.unlz4(s)