Posted 21 March 2016 - 09:12 PM
rle.lua is a simple RLE encoding and decoding library I wrote. It's basically a DIY compression and decompression library I wrote. It's very simple and naive so it likely doesn't even compare to the standard compression algorithms that are out there.
To load rle.lua:
To compress some data:
and to decompress some compressed data:
Both the compress and decompress functions expect arrays of bytes. I haven't really added any error checking to the library so if you give it invalid data, it will probably blow up.
The code and documentation as well as a detailed explanation of how it works is available on the github repository (https://github.com/SciOS-CC/rle.lua).
The project is fully open source and licensed under MIT.
Let me know what ya'll think! Thanks!
To load rle.lua:
local rle = dofile("rle.lua")
To compress some data:
local encoded = rle.compress(myData)
and to decompress some compressed data:
local decoded = rle.decompress(myEncodedData)
Both the compress and decompress functions expect arrays of bytes. I haven't really added any error checking to the library so if you give it invalid data, it will probably blow up.
The code and documentation as well as a detailed explanation of how it works is available on the github repository (https://github.com/SciOS-CC/rle.lua).
The project is fully open source and licensed under MIT.
Let me know what ya'll think! Thanks!
Edited on 24 March 2016 - 05:56 PM