Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I needed to download the Ruby Source recently from here and it says, "available in three formats" which are .tar.bz2, .tar.gz and .zip. Is there any reason that we need all three formats? At least on Linux and OSX I can do any of the three easily. On Windows, only zip is built-in, I think. Is there anything behind these preferences or is this just a religious battle?

share|improve this question
    
Just look at it as being nice to as many types of users as possible. Packaging source (or any other files) in multiple formats saves some users unnecessary manual steps. And BTW, in Windows, if you have 7zip, WinZip or WinRar all 3 formats are supported. –  Traveling Tech Guy Mar 14 '10 at 18:33
    
Yes. acceptable, ace, admirable, agreeable, bad, boss, bully, capital, choice, commendable, congenial, crack, deluxe, excellent, exceptional, favorable, first-class, first-rate, gnarly, gratifying, great, honorable, marvelous, neat, nice, pleasing, positive, precious, prime, rad, recherché, reputable, satisfactory, satisfying, select, shipshape, sound, spanking, splendid, sterling, stupendous, super, super-eminent, super-excellent, superb, superior, tip-top, up to snuff, valuable, welcome, wonderful, worthy answer. But what about keeping the Internet DRY? –  Yar Mar 14 '10 at 19:23
    
Whoa. Too much caffeine. Or a thesaurus binge :) And why DRY??? Moisturize often, or else your internet will crack. –  Traveling Tech Guy Mar 15 '10 at 4:57
    
@Traveling Tech Guy, yes, lots of caffeine :) DRY as in en.wikipedia.org/wiki/Don%27t_repeat_yourself –  Yar Mar 15 '10 at 10:58

1 Answer 1

up vote 19 down vote accepted

.tar.gz files are (still, after some years in that position) the most common archive format for archives intended for unix-a-like systems. Users on any unix-a-like system will be able to open these without installing additional software, but users running Windows can not. They are sometimes called .tgz instead though this is less common now (the convention was started to get around Windows file naming limitations that were removed in Windows NT and Windows 95).

.zip files are accessible by default on modern Windows variants without any extra software being installed. They are generally usable on any other systems too, but support is not always included by default in minimal installations.

So the above two formats are given to achieve near 100% coverage of what people will be able to open even from a freshly installed system with not extra tools added.

.tar.bz2 files are similar to .tar.gz but use the bzip2 format instead of gzip. These will be smaller, sometimes considerably smaller, so quicker to download - but support on Windows is less common and like .zip support is not always present by default on minimal installs of other OSs.

This is offered as a convenience to those users that have the extra utility installed (and possibly to save a little bandwidth for the provider), though for small files the difference is not worth the hassle of creating/offering/supporting (in install/build documentation for instance) the extra format.

.7z files are starting to be seen more these days too. These are files produced+read by 7-zip and compatible tools, and are generally much smaller than ziped or gziped archives (and often smaller than bzip2ed archives too). For instance, I regularly compress MSSQL database backups for transfer up an ADSL based internet connection - 7zip tends to produce files less than half the size of those produced in the standard zip format which makes a significant difference in transfer time (more than making up for the fact that the 7zip compression algorithm is much slower then the standard zip algorithm). The use of 7-zip format is not particularly common at the moment as the relevant tools are less commonly installed than the other options.

As with bzip2 archives, 7-zip archives are, where available, offered as a convenience to those users that have the extra utility installed (and to save a little bandwidth for the provider), though for small files the difference is not worth the hassle of creating/offering/supporting (in install/build documentation for instance) the extra format.

(if you want to see a religious battle on the subject of archive file formats, take a short trip into what is left of Usenet or pirate (sorry "scene") territory and dare to suggest that something might be more suitable than .rar archives - it is almost as incendiary as suggesting an emacs user try vim or vice-versa)

share|improve this answer
    
good answer, David. I guess I just find it to be a very non-DRY solution to repeat three file formats for every single thing we download on the Net. –  Yar Mar 14 '10 at 12:59
    
I actually read somewhere about a guy who uses vim sometimes and emacs sometimes. I was shocked! –  Yar Mar 14 '10 at 13:25
4  
No, .rar files are brilliant! They should be used for everything, including splitting TV shows up into 30 9mb files, and compressing albums! Is there anything this glorious format CAN'T do? (Or so I've heard. I buy all of my TV shows, obviously) –  Phoshi Mar 14 '10 at 13:55
2  
i would note though that if you run windows, 7zip supports all of the 4 formats mentioned ;p –  Journeyman Geek Mar 14 '10 at 14:32
    
Good explanation. As for VI and Emacs.... yeah I do that. I use Emacs for a lot of stuff while programming, but started with VI, so I have the habit of jumping into VI to fix compiler errors. –  spowers Mar 14 '10 at 15:00

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.