bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Compression Comparison (was: coreutils-6.9.90 released)


From: Bob Proulx
Subject: Compression Comparison (was: coreutils-6.9.90 released)
Date: Sun, 2 Dec 2007 22:32:45 -0700
User-agent: Mutt/1.5.13 (2006-08-11)

Jim Meyering wrote:
> To reiterate, here are the sizes:
>   coreutils-6.9.90.tar.gz    8.6 MB
>   coreutils-6.9.90.tar.bz2   5.6 MB
>   coreutils-6.9.90.tar.lzma  3.6 MB

I am a hard sell.  It is impressive but not hugely.  The original size
was 35M and so all of these already make large size reductions.  Let's
look at the numbers.

 36280320 coreutils-6.9.90.tar
 12955108 coreutils-6.9.90.tar.Z
  8996724 coreutils-6.9.90.tar.gz
  5952780 coreutils-6.9.90.tar.bz2
  3682634 coreutils-6.9.90.tar.lzma

That yields[1]:

  100% 36280320 coreutils-6.9.90.tar
   64% 12955108 coreutils-6.9.90.tar.Z
   75%  8996724 coreutils-6.9.90.tar.gz
   83%  5952780 coreutils-6.9.90.tar.bz2
   89%  3682634 coreutils-6.9.90.tar.lzma

Let's see that more visually.  Here is a bar graph.

  +----------+--------------------------------------------------+
  | compress |================================                  |
  | gzip     |=====================================             |
  | bzip2    |=========================================         |
  | lzma     |============================================      |
  | true     |==================================================|
  +----------+--------------------------------------------------+

Sure lzma is better.  For coreutils lzma is 14% better than gzip.  At
5% I would not care at all.  At 50% I would be sold.  At 14% better I
am certainly willing to acknowledge its benefits but not enough to get
*really* excited about it.  I don't think it offsets the problem of it
not being standard on systems nor fully integrated everywhere such as
in tar and other places.  For 14% I think standard is still better
than better.

  tar xzf coreutils-6.9.90.tar.gz

Versus:

  lzma -dc coreutils-6.9.90.tar.lzma | tar xf -

For 14% I think I will be lazy and prefer typing the first one[2].

(I will be really impressed when something can reduce the size as much
as 'true' can though, as long as it can decrompress it too. :-)

Bob

[1] Here is the math:

  echo $((100*(36280320-12955108)/36280320))%
  64%
  echo $((100*(36280320-8996724)/36280320))%
  75%
  echo $((100*(36280320-5952780)/36280320))%
  83%
  echo $((100*(36280320-3682634)/36280320))%
  89%

[2] I prefer not needing to recompile my system from bleeding edge
    sources every day and my system tar does not have an --lzma
    option.  (Added to CVS tar on 2007-10-17.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]