r/AskComputerScience • • Jun 24 '19

Difference between .zip and .7z?

Excuse me if this is not the appropriate sub for this type of question. If it's not, could someone direct me to the right sub?

I sometimes have to zip up files at work for no other reason than to save space on my C drive. I've noticed that there are different extension options. If all I'm trying to do is save space without losing information, which is more appropriate? Thanks in advance.

28 Upvotes

8 comments sorted by

22

u/teraflop Jun 24 '19

Both .zip and .7z are lossless compression formats. .7z is newer and is likely to give you a better compression ratio, but it's not as widely supported as .zip, and I think it's somewhat more computationally expensive to compress/decompress.

7

u/iowashittyy Jun 24 '19

Thank you for the answer! How much better of a compression ratio are we talking? When you say computationally expensive, do you mean it takes longer to compress/decompress?

16

u/wescotte Jun 24 '19

Yes that is what he means by computationally expensive. The how much better is dependent on the types of files you are compressing but according to the wikipedia article on 7z.

In 2011, TopTenReviews found that the 7z compression was at least 17% better than ZIP,[15] and 7-Zip's own site has since 2002 reported that while compression ratio results are very dependent upon the data used for the tests, "Usually, 7-Zip compresses to 7z format 30–70% better than to zip format, and 7-Zip compresses to zip format 2–10% better than most other zip-compatible programs."[16]

2

u/iowashittyy Jun 24 '19

Thank you both for the quick and comprehensive answers!

2

u/gradual_alzheimers Jun 24 '19

That’s a great Weissman score

3

u/wescotte Jun 24 '19

Feels like that show has been gone for a long time now.

1

u/kristopolous Jun 24 '19

Have you thought about using drive compression? Since you said "C Drive" I can assume you're using windows.