Earlier Versions
Name | Size | Uploaded | Game Version | Downloads | |
1.0.2-release release | 61.66 KB | Jun 26, 2020 | 8.3.0 | 136 | ![]() |
1.0.1-release release | 69.92 KB | Nov 23, 2019 | 8.2.5 | 374 | ![]() |
1.0.0-release release | 67.98 KB | Jul 29, 2018 | 8.0.1 | 663 | ![]() |
0.9.0-beta4 beta | 64.11 KB | May 25, 2018 | 8.0.1 | 61 | ![]() |
0.9.0-beta3 beta | 62.00 KB | May 23, 2018 | 8.0.1 | 13 | ![]() |
0.9.0-beta2 beta | 61.17 KB | May 22, 2018 | 8.0.1 +1 | 74 | ![]() |
0.9.0-beta1 beta | 60.70 KB | May 22, 2018 | 8.0.1 | 12 | ![]() |
0.9.0-alpha2-test-curseforge-10-g84b6558-alpha alpha | 60.73 KB | May 22, 2018 | 8.0.1 | 18 | ![]() |
0.9.0-alpha2-test-curseforge-6-g98b45aa-alpha alpha | 60.42 KB | May 22, 2018 | 8.0.1 | 8 | ![]() |
0.9.0-alpha2-test-curseforge-5-g9f25f7b-alpha alpha | 60.42 KB | May 22, 2018 | 8.0.1 | 11 | ![]() |
0.9.0-alpha2-test-curseforge-4-gf790106-alpha alpha | 60.42 KB | May 22, 2018 | 8.0.1 | 12 | ![]() |
0.9.0-alpha2-test-curseforge-3-gd28c872-alpha alpha | 43.81 KB | May 22, 2018 | 8.0.1 | 11 | ![]() |
0.9.0-alpha2 alpha | 61.44 KB | May 21, 2018 | 8.0.1 +1 | 11 | ![]() |
LibDeflate-58d4dd8.zip alpha | 62.30 KB | May 20, 2018 | 8.0.1 +1 | 9 | ![]() |
Description
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. It compresses using the same algorithm as ZIP.
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 52ms.
LibCompress (Huffman): 1.36 compression ratio in 50ms.
LibDeflate(Level 1): 3.15 compression ratio in 68ms.
LibDeflate(Level 5): 3.68 compression ratio in 116ms.
LibDeflate(Level 8): 3.71 compression ratio in 189ms.
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
Real Project Sample Code (With backward compatibility)
WeakAuras2 commit c46a8f26
Other places to get LibDeflate
- LibDeflate is also uploaded to WoWInterface. The releases on WoWInterface and Curseforge are identical.
- You can also get LibDeflate from LuaRocks using the command "luarocks install libdeflate", if you are not using the Lua interpreter in World of Warcraft.
- All release files can also be downloaded from the Github release page
License
LibDeflate is licensed under the zlib license.
Credits and Disclaimer
The following projects are used to the help to test the correctness of this program. The code of the main program (LibDeflate.lua) does not use their code directly, but uses their ideas and algorithms. Their original licenses shall be comply when used.
zlib, by Jean-loup Gailly (compression) and Mark Adler (decompression). Licensed under zlib License.
puff, by Mark Adler. Licensed under zlib License.
LibCompress, by jjsheets and Galmok of European Stormrage (Horde). Licensed under GPLv2.
WeakAuras2. Licensed under GPLv2.
Add a comment