Jump to content
  • Advertisement
Sign in to follow this  
Drew_Benton

Quick Question on File Systems

This topic is 4834 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Ok so I am working on my own file system. All is well but I have a quick question on the logic workings of it - would it be more logical to:
1. Compress all files using ZLIB first, then add them into the single '.dat' archive, and finally use TEA to encrypt it
or
2. Add all files into the single '.dat' archive first, then ZLIB that file, and finally use TEA to encrypt it
I would like to know any opinions before I take either route because I am not yet on the part of adding the files into the archive yet, but it is something I was thinking about right now. Thanks for your time! - Drew

Share this post


Link to post
Share on other sites
Advertisement
For me, it would be more intuitive to compress each file, then add them to the archive, then encrypt the archive. (Option 1) That way, when you work with the packed file, you don't need to uncompress everything to work with possibly only one file. It's a matter of speed, and it would take a lot longer than necessary to use the latter method.

I'm assuming that this is for a game or graphics application, where the data is large and the speed counts, but it really doesn't matter. The second method offers nothing except a bit more data to work with for compression, which I would assume (?) would have a negligible effect on the amount of compression possible.

Share this post


Link to post
Share on other sites
Ahhh great point! Thanks, I didn't even think about that. With that said I have revised the model a bit:

1. Compress all files using ZLIB first
2. Encrypt with TEA
3. Add all into single .dat archive

Like you said, I could only be working with single files at a time and not have to worry about decompressing/decrypting *everything*. That makes sense now [smile].

- Drew

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!