gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Coding > Compression

#1794 - XeroxBoy - Thu Jan 23, 2003 5:57 am

Which form of compression would be best for my tile data? Speed isn't really that much of an issue.

#1796 - tepples - Thu Jan 23, 2003 7:06 am

XeroxBoy wrote:
Which form of compression would be best for my tile data? Speed isn't really that much of an issue.

Try LZ77, and then try LZ77 followed by Huffman to see if the added step provides enough coding gain to justify the speed hit. Huffman is useful when a few colors dominate your tileset

If you're deciding between LZ77 and RLE, LZ77 is in general the appropriate choice. Using RLE is like using LZ77 and limiting the window size to one byte.

Caution: The GBA compatible LZ77 compressor floating around on the net has a bug such that compressed data will sometimes reference data before the start of the file. I've fixed that bug in my version of the compressor; private-message me your e-mail address if you want it.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.