(62 Kb)
Updated: 06-26-20 10:38 AM
Classic Patch (1.13.4)
Shadowlands (9.0.1)
Classic Patch (1.13.3)
Visions of N'Zoth (8.3.0)
BfA content patch (8.2.5)
Classic (1.13.2)
Updated:06-26-20 10:38 AM
Created:11-24-19 10:11 AM
Categories:Libraries, Developer Utilities, WoW Tools & Utilities


Version: 1.0.2-release
by: yoursafety [More]

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. It compresses using the same algorithm as ZIP.

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 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.

See examples/example.lua

Real Project Sample Code (With backward compatibility)
See WeakAuras2 commit c46a8f262

Other places to get LibDeflate
1. LibDeflate is also uploaded to Curseforge. The releases on WoWInterface and Curseforge are identical.
2. 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.
3. All release files can also be downloaded from the Github release page

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.

### v1.0.2-release

* Change the license to the zlib license (Formerly LGPLv3). This license is more permissive than LGPLv3.
* Increase compression speed by up to 25% on high compression level on non-JIT lua interpreter.
* Bump the World of Warcraft toc version to 80300

### v1.0.1-release

* 2019/11/18
* No functional change
* Bump the World of Warcraft toc version to 80205
* No longer "Load on Demand" in Warcraft toc, because this library does not consume much memory. This makes easier to load and test this library.
* Change the license to LGPLv3 (Formerly GPLv3)

### v1.0.0-release

* 2018/7/30
* Documentation updates.

### v0.9.0-beta4

* 2018/5/25
* "DecodeForPrint" always remove prefixed or trailing control or space characters before decoding. This makes this API easier to use.

### v0.9.0-beta3

* 2018/5/23
* Fix an issue in "DecodeForPrint" that certain undecodable string
could cause an Lua error.
* Add an parameter to "DecodeForPrint". If set, remove trailing spaces in the
input string before decode it.
* Add input type checks for all encode/decode functions.

### v0.9.0-beta2

* 2018/5/22
* API "Encode6Bit" is renamed to "EncodeForPrint"
* API "Decode6Bit" is renamed to "DecodeForPrint"

### v0.9.0-beta1

* 2018/5/22
* No change

### v0.9.0-alpha2

* 2018/5/21
* Remove API LibDeflate:VerifyDictionary
* Remove API LibDeflate:DictForWoW
* Changed API LibDeflate:CreateDictionary

### v0.9.0-alpha1

* 2018/5/20
* The first working version.
Archived Files (1)
File Name
11-24-19 10:11 AM

There have been no comments posted to this file.
Be the first to add one.

Category Jump: