SFML community forums
Help => General => Topic started by: Keebler Elf on December 19, 2014, 05:46:02 pm
-
Hello,
I am wondering what peoples thoughts are on the best libraries and methods to handle compression along side SFML. I would like to keep the option for cross platform capability. I would just like to know if anyone here has come across an optimal solution before I go through the effort of implementing one of my own. My main need is the ability to compress map data. Which is getting very large for my tilemaps and other map data. I originally was looking into using things like ZLIB to simply compress the .txt file I am currently storing data in and then just compressing and uncompressing the various data files as I need them. I feel there must be a better way.
Thank you for your time.
-
You could check out PhysicsFS (http://icculus.org/physfs/).
It can use archives as "virtual" filesystems and compress/decompress on the fly.
-
There have also been various threads about compression, you could search the forum.
-
As I far as I know physicsFS only allows reading from archives, not writing. Are you sure eXpl0it3r or did I miss something?
-
You can also write data.
Apparently you can't, however you can still use PhysicsFS to read from compressed archives, you'd just have to use for example zlib directly, if you wanted to write an archive.