[H-GEN] Compressing ISO images (Was: Darwin ?)
Greg Black
gjb at gbch.net
Sun May 26 01:41:09 EDT 2002
[ Humbug *General* list - semi-serious discussions about Humbug and ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]
Jason Henry Parker wrote:
| Sandra Milne <silne at optushome.com.au> writes:
|
| > sorry to change tack, but does gzipping an iso make much difference to
| > the size?
|
| It would appear the answer is "yes, perhaps":
With compression, the answer really does depend on the data and
it's frequently difficult to estimate the results without really
doing the testing.
I have no reason to download the ISO that was mentioned, but
I've done some tests on a couple of handy ISO images, using both
gzip and bzip2:
$ ls -l
total 3410120
-rw-r--r-- 1 gjb gjb 667224064 May 26 10:20 cd1.iso
-rw-r--r-- 1 gjb gjb 637675791 May 26 12:31 cd1.iso.bz2
-rw-r--r-- 1 gjb gjb 633177816 May 26 11:14 cd1.iso.gz
-rw-r--r-- 1 gjb gjb 627050496 May 26 10:26 cd2.iso
-rw-r--r-- 1 gjb gjb 457136318 May 26 15:06 cd2.iso.bz2
-rw-r--r-- 1 gjb gjb 467892293 May 26 11:46 cd2.iso.gz
In one case, the compression was hardly worth the effort, but in
the second case it made a significant difference. Also, it's
worth noting that bzip2, despite being /much/ slower than gzip,
sometimes does worse than gzip and sometimes does marginally
better. The times for the various compressions were also quite
interesting:
$ time gzip -9 < cd1.iso > cd1.iso.gz
541.596s real 496.074s user 25.933s system
$ time gzip -9 < cd2.iso > cd2.iso.gz
855.109s real 799.453s user 22.575s system
$ time bzip2 -9 < cd1.iso > cd1.iso.bz2
2240.287s real 2107.428s user 22.281s system
$ time bzip2 -9 < cd2.iso > cd2.iso.bz2
1948.464s real 1837.384s user 17.390s system
We can see that gzip managed both jobs in between a half and a
quarter the time it took bzip2; but gzip wasted far less time
than bzip2 on the largely incompressible 1st ISO (9m versus
37m); and gzip managed to shave 160 Mbytes off the second file
in 14m compared with bzip2's 170 Mbytes in 32m.
Anyway, as they say, YMMV.
Greg
--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'. See http://www.humbug.org.au/
More information about the General
mailing list