Change to bzip2?

Phil Knirsch pknirsch at
Wed Feb 2 17:09:49 UTC 2005

Paul Iadonisi wrote:
> [snip]
>   Which begs the question ... why has Red Hat (at least in some cases,
> historically), veered (admittedly only slightly) from the pristine
> source principle by uncompressing gzipped tarballs and recompressing
> them with bzip2 only to stuff them in into an rpm if rpm uses gzip?

I think that compressing tarballs of source tars in srpms is a little 
different than compressing the payload in binary rpms.

Because for the first you don't actually need the least itsybitsy of 
speed and using bzip2 safes quite a bit of storage for source tarballs.

For binary rpms otoh it's different as there you want a quick 
installation, so uncompression speed does matter there, and the 
difference for the binary payload compress with bzip2 and gzip should be 
considerably less drastic than with source tarballs.

As a test i've created a cpio archive of the current openoffice package 
in FC:

[root at hamburg tmp]# ll foo.cpio
-rw-r--r--  1 root root 98993152 Feb  2 17:51 foo.cpio

Now the different runtimes and sizes for gzip:

[root at hamburg tmp]# /usr/bin/time gzip -9 foo.cpio
20.15user 0.31system 0:20.47elapsed 99%CPU
[root at hamburg tmp]# ll foo.cpio.gz
-rw-r--r--  1 root root 34026424 Feb  2 17:51 foo.cpio.gz
[root at hamburg tmp]# /usr/bin/time gunzip -9 foo.cpio.gz
1.19user 0.37system 0:01.65elapsed 94%CPU

Now the same for bzip2:

[root at hamburg tmp]# /usr/bin/time bzip2 -9 foo.cpio
52.49user 0.45system 0:53.05elapsed 99%CPU
[root at hamburg tmp]# ll foo.cpio.bz2
-rw-r--r--  1 root root 30408374 Feb  2 17:51 foo.cpio.bz2
[root at hamburg tmp]# /usr/bin/time bunzip2 foo.cpio.bz2
11.73user 0.69system 0:12.47elapsed 99%CPU

So the speed difference in unpacking is about 1:10, size difference is 
about 1.12:1 which clearly demonstrates my point. I don't want my 
installation to take 10 times longer for the sake of 12% space saving in 
the binary rpms.

My uncompressed $0.02

Read ya, Phil

Philipp Knirsch      | Tel.:  +49-711-96437-470
Development          | Fax.:  +49-711-96437-111
Red Hat GmbH         | Email: Phil Knirsch <phil at>
Hauptstaetterstr. 58 | Web:
D-70178 Stuttgart
Motd:  You're only jealous cos the little penguins are talking to me.

More information about the fedora-devel-list mailing list