Hi everyone,
one spin-off our music engine VBeat (*ads here*) was a short decompression routine written in assembly to decode LZ4 compressed data (font, worlds). LZ4 is extremely fast and wide-spread, AND open.
You can find the full depacker sources here: enthusi github.
The decoder is a mere 124 Byte (if I didnt miscount) large.
It also got noted by LZ4’s inventor and was listed on LZ4’s main page <3
In VERY short: the idea is to reference back (if possible large chunks of) data to parts of memory that were already depacked. Things that repeat compress well, even when there is all kinds of data inbetween. The RLE (compress a series of identical bytes) is a special case that falls out for free as well.
(optimally) encoding this can be tedious but there are numerous free tools for compression out there for all plattforms.
You can check the VBeat sources for an easy implementation of it.
Cheers
enthusi
This topic was modified 3 years, 3 months ago by enthusi.