dtgreene: zram works best with compressible data. Many (most?) games store their assets as compressed files, so storing them in zram would not provide an improvement.
I was mostly referring to while you're compiling or working with probably temporary files, since source code and most stages of are generally compressible. I understand most games save their contents compressed, although i notice most of them aren't as well compressed as they could be; and you could optimize the images used to get 10% extra it seems usually.
Although for packaging during transfer over the internet there are some cases where uncompressed would be better since LZMA does a much better job, but extracting them they should be given compression during the output. Experiments have shown a 5:1 extra compression this way, ToME is a good example... as are adult Japanese dating games (
heavy duplication between images noted outside file boundaries, or are larger than 64k so zlib wouldn't catch it); Although having ToME run totally on uncompressed PNG's has quite a performance hit since it expects to decompress the files and when it doesn't it probably has a lot of extra memory allocation it ends up wasting.
It also has a performance hit if the zip's ToME uses are compressed rather than stored, so double performance hit if PNGs are compressed inside the zip file.
dtgreene: Of note, there is no way to compress arbitrary data. If there were, a single bit would have to be compressed down to zero size, and there is only one unique zero size file. How can you determine which of the two 1-bit files it should decompress into?
For 1 bit, you can't (
obviously). But for a larger sample, say a million bits, you could reduce almost any data down (
a least a little), but assuming you could it would probably take quite a performance hit, be it from LZMA, PPMD, or something else, while ZLIB/LZOP have very little in comparison, and are better suited for faster random access.