I'm following this discussion with great interest, but don't feel there's much I can add at this point ... except to remind you that Java's "jar" files are actually zip files. The java "jar" utility uses, if I recall correctly,
the same command options as the Unix "tar" command, more or less.

Perhaps this also speaks for prefering zip files.

-Tom Gordon

On Aug 14, 2009, at 8:44 AM, Abdulaziz Ghuloum wrote:


On Aug 14, 2009, at 4:32 AM, Andreas Rottmann wrote:

I honestly don't know all the pros and cons of zip vs tar.gz files.
Do you know when one would choose one over the other?

I'm no expert on this topic, but I think two of the relevant differences
are:

- Zip has better tool support on Windows, while compressed tarballs are
 more common on UNIX/POSIX platforms. IMHO, we shouldn't care about
Windows in that regard, since while there may be something like WinZip
 on many (or even most) Windows machines, we can't rely on that, and
 need something with a standardized command-line interface
 anyway. OTOH, on GNU/Linux you can pretty much rely on tar and gzip
 being present, and bzip2 is commonly installed as well (if not it's
 just an "$PKG_MANAGER install" away :-).

1. On linux, there's no problem using either zip or tgz or whatever.
On windows, zip files are well supported (there is always the free
zip/unzip tools from info-zip.org that work on all platforms and is
well supported).

2. The different Unixes have incompatible "tar" utilities (there are
at least 3 flavors: gnu, bsd, and solaris, and I don't know what you'd
get under windows).

3. We can choose to interface directly with libzip to do whatever we
need to do.  tgz files, being two-layer, are harder to process in
place.

I think we should go with zip files as I see no problem with it.

- The already mentioned random access issue. If we really need that, it
 would surely make the case for Zip.

It's good to have, even if we don't need it immediately.

Aziz,,,

Reply via email to