Jump to content
  • Advertisement
KarimIO

What modern, open-source compression library should I use

This topic is 529 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

Hey guys,

I'm just wondering what are the best modern, open-source compression libraries. IE: WAD, VPK, GCF, PAK, APK, etc.

Also what are the things I need to consider when choosing one?

Thanks!

Share this post


Link to post
Share on other sites
Advertisement
42 minutes ago, iedoc said:

zlib is a good one. also apk is an android executable btw

But apk does store the data in a compressed format right?? Anyways thanks!

Share this post


Link to post
Share on other sites

Yeah, they're Zip-compressed. Zip (or other DEFLATE forms, like Gzip) is pretty much the running standard for everyday compression. Even PNG uses DEFLATE. Or if you want something ultra-compressed (at a cost of compression/extraction speed), you could use LZMA. But Zip is probably what you want in almost all cases.

Share this post


Link to post
Share on other sites

Things you need to consider when choosing one?  Have a think about the reasons why you want compression.  Depending on your platform, saving disk space may not be as important a consideration as it would have been 10 or even 5 years ago.  You might place more importance on how quick it is to read the archive off the disk and how quick it is to decompress the file - both of these will factor into the load times your users experience.  Do you want any kind of encryption, perhaps as a deterrent to casual meddling?  Does the format come with any IP encumberance regarding distribution?  What is the licensing like in general anyway?  Can you statically link to the library or does it have to be dynamic, and does that even matter to you?  Does it come with good sample code that matches well with your use case(s)?  What about support facilities - is there an active end-user forum, for example?

That's a sampling of things that should be going through your head as you weigh up the options.

Share this post


Link to post
Share on other sites
19 minutes ago, mhagain said:

Things you need to consider when choosing one?  Have a think about the reasons why you want compression.  Depending on your platform, saving disk space may not be as important a consideration as it would have been 10 or even 5 years ago.  You might place more importance on how quick it is to read the archive off the disk and how quick it is to decompress the file - both of these will factor into the load times your users experience.  Do you want any kind of encryption, perhaps as a deterrent to casual meddling?  Does the format come with any IP encumberance regarding distribution?  What is the licensing like in general anyway?  Can you statically link to the library or does it have to be dynamic, and does that even matter to you?  Does it come with good sample code that matches well with your use case(s)?  What about support facilities - is there an active end-user forum, for example?

That's a sampling of things that should be going through your head as you weigh up the options.

In that case, is there any non-compressed data format for me to package all my resources into? I could make one but I figure using standards are usually better.

Share this post


Link to post
Share on other sites
5 hours ago, KarimIO said:

Hey guys,

I'm just wondering what are the best modern, open-source compression libraries. IE: WAD, VPK, GCF, PAK, APK, etc.

Also what are the things I need to consider when choosing one?

Thanks!

The question is rather vague as no use case was mentioned...mhagain highlighted some good points to factor in, but overall I'm inclined to think you are looking for specific answers.

Share this post


Link to post
Share on other sites
8 minutes ago, KarimIO said:

In that case, is there any non-compressed data format for me to package all my resources into? I could make one but I figure using standards are usually better.

Yes, it's called a directory. What is it you actually want to achieve?

Share this post


Link to post
Share on other sites
9 minutes ago, Prototype said:

Yes, it's called a directory. What is it you actually want to achieve?

Haha very clever. I was referring to minimizing disk lookups by storing everything in one file. While I was originally looking to compress it, that was because I believed it would decrease loading time in exchange for minimal decompression time. Now I'm just looking to load a set of files in one uncompressed archive. 

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!