395 Downloads Last Updated: Jul 29, 2018 Game Version: 8.0.1


Pure Lua compressors and decompressors with high compression ratio using DEFLATE/zlib format.


LibDeflate is pure Lua compressor and decompressor with high compression ratio, which compresses almost as good as zlib.


Documentation is hosted on Github.


Below is a simple benchmark compared with another pure Lua compressor LibCompress.

The size of The input data is 158492 bytes. The benchmark runs on Lua 5.1.5 interpreter.

NOTE: The compression method used by LibDeflate here is LibDeflate:CompressDeflate (Compress using raw DEFLATE format)

LibCompress (LZW): 1.20 compression ratio in 58ms.

LibCompress (Huffman): 1.36 compression ratio in 64ms.

LibDeflate(Level 1): 3.15 compression ratio in 70ms.

LibDeflate(Level 5): 3.68 compression ratio in 120ms.

LibDeflate(Level 8): 3.71 compression ratio in 200ms.

LibDeflate with compression level 1 compresses as fast as LibCompress, but already produces significantly smaller file than LibCompress. High compression level takes a bit more time to get better compression.


See examples/example.lua


  1. zlib, by Jean-loup Gailly (compression) and Mark Adler (decompression). Licensed under zlib License.
  2. puff, by Mark Adler. Licensed under zlib License.
  3. LibCompress, by jjsheets and Galmok of European Stormrage (Horde). Licensed under GPLv2.
  4. WeakAuras2. Licensed under GPLv2.


LibDeflate is licensed under GNU General Public License Version 3 or later.


  • To post a comment, please or register a new account.
Posts Quoted: