On Sun, Feb 02, 2014 at 05:12:33PM -0500, Brandon Fergerson wrote:
Hello, I am trying to make a compressed map file for a game I'm working on but I'm having a bit of trouble with making changes to the compressed file. The map files that my game creates are very big but a lot of that data is repetitive so I what I do is I create a big empty map and then compress it. This allows me to have massive maps within tiny files. Now I realize they are only small because it is compressing repeated 0's but even when the actual values of the tiles of the map are implemented they will still be rather repetitive so the size should still remain somewhat small.

Maybe better to use sparse files[1] and then you get all the benefits of using mmap()? Of course if your target platform includes OS X you are out of luck for sparse files.

If your files are less than 4GB and you need OS X, you might get some mileage 
out of BitMagic[2].

[1] http://en.wikipedia.org/wiki/Sparse_file
[2] http://bmagic.sourceforge.net/

--
Alexander Clouter
.sigmonster says: L'etat c'est moi.
                        [I am the state.]
                                -- Louis XIV

Reply via email to