For my emulator of the classic 8-bit computer called Radio-86RK running on the Maximite microcomputer I needed a compression library. The emulator has a virtual ROM drive, but the overall amount of files I wanted to put there was more than 1M, and the capacity of the PIC32 flash was only 512K. So, a cunning plan was to compress the data and then decompress them on-the-fly inside the PIC.
Two compression libraries were discovered:
The selection criteria were:
The both libraries compiled and worked for PIC32 without any issues.
On my data miniz provided the 0.78 compression ratio and minilzo - 0.71. So, both didn’t squeeze my data into the 512KB flash of PIC32.
Also miniz uses only the output buffer for decompression, but minilzo requries at least 16K static buffer.
P.S. I also tried XZ Embedded (LZMA2). It looked that it compressed much better but it requires malloc/free API, so I didn’t manage to build it on PIC32 without extra development.