SFML community forums

Help => General => Topic started by: dk123 on January 17, 2015, 08:25:49 pm

Title: Zip file solution for Streams
Post by: dk123 on January 17, 2015, 08:25:49 pm
Hi, I was wondering if anyone new of any zip file InputStream implementations (that also work with password encryption) for SFML.
Title: Re: Zip file solution for Streams
Post by: eXpl0it3r on January 17, 2015, 10:33:38 pm
For just zip files without password encryption you can take a look at PhyFS (http://icculus.org/physfs/),  there's even a possible implementation (https://github.com/SFML/SFML/wiki/Source%3A-PhysicsFS-Input-Stream) by FRex.

Other than that you probably want to use zlib directly. Though if you think about using an encrypted zip to "protect" your assets, just don't. No matter how good you try to "hide" the password in your binary, security through obscurity doesn't work.
Title: Re: Zip file solution for Streams
Post by: FRex on January 17, 2015, 10:42:11 pm
Exploiter, you've linked the same thing twice. ;D
http://icculus.org/physfs/
PHYSFS is a very simple to use C library and has rather nice and unified API for real filesystem and archives. And it gets (depending on build options) other archive types too - notably 7zip (and some idiotic/exotic ones that you won't need, like doom's wads, quake's pak, build's grp and few more I don't even care to remember).
Title: Re: Zip file solution for Streams
Post by: eXpl0it3r on January 17, 2015, 11:24:07 pm
Exploiter, you've linked the same thing twice. ;D
I swear one day, I'm gonna hunt down whoever changed the Chrome's address bar selection behavior, so annoying... >:(
Thanks, fixed it. ;D