LibDeflate

LibDeflate

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

Introduction

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

Documentation

Documentation is hosted on Github.

Performance

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.

Usage

See examples/example.lua

Credits

  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.

License

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


Comments

  • To post a comment, please or register a new account.
Posts Quoted:
Reply
Clear All Quotes

About This Project

Categories

Members

Recent Files