lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi,

I’m happy to announce the first release of brieflz [1] – Lua/C binding for BriefLZ [2], small and fast open source implementation of a Lempel-Ziv style compression algorithm by Joergen Ibsen.

BriefLZ is really very small C library, just 123 LoC compression code / 115 LoC safe decompression (or 63 LoC unsafe), and offers decent compression ratio. Of course it can’t compete in compression ratio with zlib or other “heavy” compression libraries, but it’s a good choice if you need good enough compression with minimal footprint. I found that it has much better compression ration on Lua sources than more known liblzf [3].

Just for very rough idea: 817 kiB Lua source (merged multiple sources, with a lot of comments) compressed to 243 kiB with BriefLZ, 337 kiB with liblzf, 207 kiB with gzip -9.

brieflz is available on LuaRocks [4] or as a tarball in the repository [1]. Documentation in ldoc is available on [5].

Jakub

[1]: https://github.com/jirutka/brieflz.lua
[2]: https://github.com/jibsen/brieflz
[3]: https://github.com/nemequ/liblzf
[4]: https://luarocks.org/modules/jirutka/brieflz
[5]: https://jirutka.github.io/brieflz.lua/ldoc/