0 Members and 2 Guests are viewing this topic.
"Spiffy compression" is actually very bad. I'd gladly purge it from the face of the internet if I could.Anyway, I'm just responding to let you know about a new compression method I've been trying out since then.A while ago, I was reading a neat article about image data compression, this page suggests using prediction combined with bit-level RLE to compress images:http://hbfs.wordpress.com/2009/04/14/ad-hoc-compression-methods-rle/So I had implemented this compression method, I wanted to see how well it did. I had to modify this compression method for 1-bit images.I used this test image:The compression method works by creating a predicted image by looking at the current pixel, the pixel to the left, and the pixel above the current pixel.After you make a predicted image, you can compress that, and it compresses better than a regular image.After you decompress it, you need to also un-predict it back to a normal image.The compression method used is RLE, when you see two of the same bit, it starts an RLE run, just like the algorithm described on that page.The Bubble Bobble title screen there compresses to 601 bytes, which beats WinRAR by 36 bytes.I've written a compressor in C#, but I haven't written any decompressors in Z80 yet. Are you interested in me writing one?By the way, the compression method works much better on higher bit depths, like NES or Gameboy 2bpp images, because the predictor emits far more zeroes than anything else, and you can take advantage of that.Good luck on your game!