Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Is there some small library for C++, or would be too much of a trouble to create one that "packs" (not compress) multiple game files into one bigger file (something like Valve .gcf) and reading from application should be easy; like accessing ordinary stored file.

If not, how much troublesome do you think would be to make one?

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

my_asset_file->setAssetFile(ASSET_FOLDER + '/file.ext');
Model *m = new Model();
m->loadFromTxtFile(my_asset_file->openTxtFile('models/props/lamp.obj'));
share|improve this question
    
Why couldn't you use something like zlib? And why the requirement to not compress? –  Tetrad Feb 22 '12 at 1:09
    
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 =) –  Patrick Hughes Feb 22 '12 at 1:46
    
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.. –  Grimshaw Feb 22 '12 at 2:01
    
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. –  Edin M. Feb 22 '12 at 11:13
    
@DevilWithin Would you mind sharing it with the community then? I think it would be more than helpful to all of us. –  Sin Jun 16 '13 at 16:57

1 Answer 1

up vote 7 down vote accepted

PhysicsFS should be able to handle it.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.