Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Best way to handle Compression along side SFML  (Read 1281 times)

0 Members and 1 Guest are viewing this topic.

Keebler Elf

  • Newbie
  • *
  • Posts: 1
    • View Profile
Best way to handle Compression along side SFML
« 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Best way to handle Compression along side SFML
« Reply #1 on: December 20, 2014, 01:50:40 am »
You could check out PhysicsFS.
It can use archives as "virtual" filesystems and compress/decompress on the fly.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: Best way to handle Compression along side SFML
« Reply #2 on: December 20, 2014, 04:55:24 am »
There have also been various threads about compression, you could search the forum.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

G.

  • Hero Member
  • *****
  • Posts: 1593
    • View Profile
Re: Best way to handle Compression along side SFML
« Reply #3 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?
« Last Edit: December 20, 2014, 10:26:45 am by G. »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11032
    • View Profile
    • development blog
    • Email
AW: Best way to handle Compression along side SFML
« Reply #4 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.
« Last Edit: December 20, 2014, 12:38:40 pm by eXpl0it3r »
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/