Re: compress vs gzip vs bzip2 (vs pack) - was IDS TRIAL ( not trail ) download.



Double Echo wrote:
I noticed three different compression methods for the various products,
for Linux. .gz and .Z .  I don't even know if my Linux has an uncompress
command, gzip or bunzip2 are the standard.  Have them all the same,
tar.gz for UNIX/Linux, and .zip for Windows.  If maximum compression is
insisted upon, then go for bunzip2 format, but only if you really can't
just use .tar.gz.  If you have to use compress format ( .Z ) then use it
for UNIX, but not for Linux platforms, nobody uses compress on Linux when
you can use gzip.

You can use gzip (gunzip) to decompress files created with compress (.Z), as well as uncompress itself, of course.


A .tar.gz file is typically 10-20% bigger than a .tar.bz2 file of the same material.

Once upon a time, there was a program called pack (and unpack, and pcat) that used the suffix .z (lower-case). It was nowhere near as efficient as compress (.Z), which in turn is not as efficient as gzip, which is usually less efficient than bzip2. The zip program - available on (or for) Windows and Unix/Linux - is about as efficient as gzip.

Personally, I still use gzip when I distribute SQLCMD, mainly because I always have done, and I use the .tgz suffix to boot. For DBD::Informix, I use .tar.gz because everything in the Perl world does. Otherwise, I use bzip2 unless there's a compelling reason to do otherwise. And I typically uncompress and then compress (with bzip2) anything that isn't suppplied as a bzip2 file, simply to save the space. Doubly so with the older Informix software. The latest versions are mainly compressed material already and recompressing them does nothing significant to save space.

Note that GNU TAR 1.15.1 has built-in support for bzip2 (-j to create), and auto-detects the compressor program for decompression. That permits you to type:

tar -xf tarfile1.tgz
tar -xf tarfile2.tar.gz
tar -xf tarfile3.tar.bz2
....

All are detected and managed correctly.

--
Jonathan Leffler                   #include <disclaimer.h>
Email: jleffler@xxxxxxxxxxxxx, jleffler@xxxxxxxxxx
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/
.



Relevant Pages

  • Re: compress, uncompress no sim link to gunzip?
    ... > compress and uncompress man pages and executables. ... gzip and gunzip are their own separate executables. ...
    (Fedora)
  • Re: compress, uncompress no sim link to gunzip?
    ... > The question is should there be sim links for compress and uncompress to ... gunzip will uncompress compressed data. ... But gzip was written to use ...
    (Fedora)
  • uncompressing a .Z file
    ... on windows/intel platform using perl ... I'm trying with no success to uncompress a .tar.Z file, ... solaris/SPARC using compress) ... when i use gzip -d on my windows workstation on the specific ...
    (comp.lang.perl.modules)
  • Re: [Announce] [patch] Modular Scheduler Core and Completely Fair Scheduler [CFS]
    ... On Monday 16 April 2007 01:16, Gene Heskett wrote: ... surprising Ingo made it a separate patch set as Con has repeatedly ... gzip simply doesn't play well with others... ... than the scheduler in linux, and that's how much writes hurt just about ...
    (Linux-Kernel)
  • Re: NSA and crypto
    ... If you still think gzip is better to use ... You really need a bijective compress so that no information ... no concept of entropy or Unicity Distance. ... Encrypt this with AES using ...
    (sci.crypt)