Is ZNG your own image format? Does it actually have any relation to PNG at all?
I like xlsior's idea of encrypting after compressing otherwise you aren't giving your compression `ideal data` to compress.
Also I wondered, are you applying any of the `filters` which PNG uses to make the data more compressable? At the very least, I would convert the data to the *difference in value between the previous pixel and the next pixel* rather than absolute pixel values. Since colors don't change that rapidly usually this results in a much narrower range of values with much more repeatability, and compresses better. You might also look as some of PNG's other filter methods - although I'm assuming you're not already doing that.
I would avoid using strings ever at all to deal with data, you don't need to be using strings for anything other than handling text. Use pointers for fastest access, and write using things like Bank.WriteBytes or whatever it is.
Using zip to do your compression will probably be fairly good lossless compression, but you really can help it along by making reversable changes to the data before compressing.
How long does it take to compress and decompress? Does it decompress/load faster than a PNG?
Is your encryption basically to do a modulo based on a key?
I like xlsior's idea of encrypting after compressing otherwise you aren't giving your compression `ideal data` to compress.
Also I wondered, are you applying any of the `filters` which PNG uses to make the data more compressable? At the very least, I would convert the data to the *difference in value between the previous pixel and the next pixel* rather than absolute pixel values. Since colors don't change that rapidly usually this results in a much narrower range of values with much more repeatability, and compresses better. You might also look as some of PNG's other filter methods - although I'm assuming you're not already doing that.
I would avoid using strings ever at all to deal with data, you don't need to be using strings for anything other than handling text. Use pointers for fastest access, and write using things like Bank.WriteBytes or whatever it is.
Using zip to do your compression will probably be fairly good lossless compression, but you really can help it along by making reversable changes to the data before compressing.
How long does it take to compress and decompress? Does it decompress/load faster than a PNG?
Is your encryption basically to do a modulo based on a key?