SFML community forums

Help => General => Topic started by: Keebler Elf on December 19, 2014, 05:46:02 pm

Title: Best way to handle Compression along side SFML
Post 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.
Title: AW: Best way to handle Compression along side SFML
Post by: eXpl0it3r on December 20, 2014, 01:50:40 am
You could check out PhysicsFS (http://icculus.org/physfs/).
It can use archives as "virtual" filesystems and compress/decompress on the fly.
Title: Re: Best way to handle Compression along side SFML
Post by: Nexus on December 20, 2014, 04:55:24 am
There have also been various threads about compression, you could search the forum.
Title: Re: Best way to handle Compression along side SFML
Post by: G. on December 20, 2014, 08:42:17 am
As I far as I know physicsFS only allows reading from archives, not writing. Are you sure eXpl0it3r or did I miss something?
Title: AW: Best way to handle Compression along side SFML
Post by: eXpl0it3r on December 20, 2014, 10:16:26 am
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.