1819687 Members
3694 Online
109605 Solutions
New Discussion юеВ

compress vs. gzip

 
SOLVED
Go to solution
someone_4
Honored Contributor

compress vs. gzip

what is the best way to compress files and why? Compress or gzip or is there another way besdes that?

Richard
7 REPLIES 7
linuxfan
Honored Contributor
Solution

Re: compress vs. gzip

Hi Richard,

This is an introduction para of gzip from http://www.gzip.org

/Begin/
gzip (GNU zip) is a compression utility designed to be a replacement for compress. Its main advantages over compress are much better compression and freedom from patented algorithms. It has been adopted by the GNU project and is now relatively popular on the Internet. gzip was written by Jean-loup Gailly (jloup@gzip.org), and Mark Adler for the decompression code.
gzip produces files with a .gz extension. gunzip can decompress files created by gzip, compress or pack. The detection of the input format is automatic.

/End/

AFAIK, gzip does a better compression than compress.

The other compress utilities are pkzip/pkunzip which is compatible with DOS's zip/unzip. You have bzip2 as well

-HTH
Ramesh
They think they know but don't. At least I know I don't know - Socrates
Praveen Bezawada
Respected Contributor

Re: compress vs. gzip

Hi
gzip , though slower than compress is far more efficient .
But gzip is not always available on all machines.

...BPK...
Thierry Poels_1
Honored Contributor

Re: compress vs. gzip

hi,
overall I get the best results with gzip, or "gzip -9" (for highest compression).
In addition Winzip on PC seems to be very compatible with gzip, very nice for copying large files to PC ;)

regards,
Thierry.
All unix flavours are exactly the same . . . . . . . . . . for end users anyway.
Enno Baars
Advisor

Re: compress vs. gzip

If you're aiming for best compression rates in term of size you'll want to use bzip2.
It's not very fast though...

Checkout their official Page:

http://sources.redhat.com/bzip2/

Cheers,

Enno.
Oh God, I hate this damn machine, I wish that they would sell it! It never does that what I mean but only what I tell it.
Deshpande Prashant
Honored Contributor

Re: compress vs. gzip

Hi
Overall gzip gives better compression ratios for text/doc files.

I found auditing files /var/adm/sa?? gets better compressed than gzipped. But the sar report outputs /var/adm/sar?? gives smaller files with gzip than compress.

Thanks.
Prashant.
Take it as it comes.
Richard Darling
Trusted Contributor

Re: compress vs. gzip

Hi Richard,
Here is a link that gives a detailed explanation, in the Introduction section, of the advantages of gzip over compress...

http://www.gzip.org/

Richard Darling
Joseph C. Denman
Honored Contributor

Re: compress vs. gzip

gzip gzip gzip gzip

Much better compression. I just did a comparison. On one of my databases:

compress size=10GB
gzip size=7GB

Savings of 3GB of disk space.


...jcd...
If I had only read the instructions first??