I've been trying to make your code support PNG. Well, let me tell you. It's pretty much it's own function altogether.

Here is the documentation I've been using: http://www.libpng.org/pub/png/spec/1...-Contents.html

I've got a little CRC function to handle calculating CRC for each chunk. The only thing I'm stuck on is how to encode the IDAT chunk data. I'm not 100% sure, but I believe that I have to drop in 1 byte before each scanline of image data specifying it's filter method. THEN I take that data and lzh encode it and then do my CRC then store it. *whew* This format doesn't mess around.

Can someone let me know if I'm on the right track or at least point me in the right direction. Considering that I'm using JEDI-SDL and OpenGL I'm trying to think of how I'm going to do the compression now.