Since nobody apparently had benchmarked the usual algos on the NES, I ran some. Feel free to copy to the wiki if you want.
Zlib is the asm-optimized version included in cc65, the others were compiled C, and it shows in the speed. Speed is decompression in kb/s. The data used was the first 768 bytes of the GPL, ie English text, comparable to any level data you'd usually use in compressibility.
I started with the assumption LZO would be best of the no-RAM algos, and indeed it was. Its speed was a surprise however, on desktops it is extremely fast, here it's over twice as slow as zlib. Being GPL it is not usable for many closed projects, though commercial licenses are available.
Might try others if I find some, only LZO advertises being low RAM.
edit: Added lz5hc.
Code:
Algo | Ratio | Speed | License, comments
-------------------------------------------
zlib | 0.527 | 6.4 | zlib, requires 0.7kb RAM -> not usable without extra RAM
exomizer mem | 0.581 | 9.4 | Free to use/modify; needs about 162 bytes of temp RAM, 4 of which need to be ZP
lzo | 0.666 | 2.8 | GPL, no RAM required
lz5hc | 0.688 | 2.5 | BSD, no RAM required
fastlz | 0.725 | 3.9 | MIT, no RAM required
lz4hc | 0.731 | 5.8 | BSD, no RAM required - optimized asm is 39.5kb/s
-------------------------------------------
zlib | 0.527 | 6.4 | zlib, requires 0.7kb RAM -> not usable without extra RAM
exomizer mem | 0.581 | 9.4 | Free to use/modify; needs about 162 bytes of temp RAM, 4 of which need to be ZP
lzo | 0.666 | 2.8 | GPL, no RAM required
lz5hc | 0.688 | 2.5 | BSD, no RAM required
fastlz | 0.725 | 3.9 | MIT, no RAM required
lz4hc | 0.731 | 5.8 | BSD, no RAM required - optimized asm is 39.5kb/s
Zlib is the asm-optimized version included in cc65, the others were compiled C, and it shows in the speed. Speed is decompression in kb/s. The data used was the first 768 bytes of the GPL, ie English text, comparable to any level data you'd usually use in compressibility.
I started with the assumption LZO would be best of the no-RAM algos, and indeed it was. Its speed was a surprise however, on desktops it is extremely fast, here it's over twice as slow as zlib. Being GPL it is not usable for many closed projects, though commercial licenses are available.
Might try others if I find some, only LZO advertises being low RAM.
edit: Added lz5hc.