I want to somehow "pack" (not compress) multiple game files into one bigger file. Something like Valve's .gcf, where reading from the application should be easy; like accessing an ordinary stored file.

I'm aiming for some kind of simple use, something like:

my_asset_file->setAssetFile(ASSET_FOLDER + '/file.ext');
Model *m = new Model();
  • \$\begingroup\$ Why couldn't you use something like zlib? And why the requirement to not compress? \$\endgroup\$
    – Tetrad
    Commented Feb 22, 2012 at 1:09
  • \$\begingroup\$ In many cases running a second compression on already compressed data will actually expand the storage used. But even so, zlib (and variants) as been used quite successfully for this purpose so now I'm curious as to nekome's reason =) \$\endgroup\$ Commented Feb 22, 2012 at 1:46
  • \$\begingroup\$ I have done exactly that for my little game engine, I guess I could just share it with you if you wanted, even the whole engine.. \$\endgroup\$
    – Grimshaw
    Commented Feb 22, 2012 at 2:01
  • \$\begingroup\$ Well, i wouldn't want to spend processing cycles for decompression while player plays, while engine loads some props. And I did thought about zlib or lzma but wasn't sure how easy would be to use it for this purpose. PhysicsFS seems to be made for this purpose but I'll check it out as well as these other two. Thanks; @DevilWithin thanks, but this PhysicsFS should do the trick. \$\endgroup\$
    – edin-m
    Commented Feb 22, 2012 at 11:13
  • \$\begingroup\$ @DevilWithin Would you mind sharing it with the community then? I think it would be more than helpful to all of us. \$\endgroup\$
    – Sin
    Commented Jun 16, 2013 at 16:57

1 Answer 1


PhysicsFS should be able to handle it.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .