> nice point showing the cost -9 for compressing. But what about *uncompressing*?
> That's what is important here!
Well, I thought -n in gzip changed nothing for decompression, just for
compression. I would expect to gain a little in -9 just because the file
is smaller and I have less to read, but no other gain in time. Therefore,
from the numbers above, I would expect a gain of .6%. Some more tests
(presented as an array not to have tons of shell lines):
time to time to
compress (%) decompress (%) size (%)
gzip -1 6.28s (49) 1.75s (106) 8645419 (108)
gzip (-6) 12.90s (100) 1.65s (100) 8014728 (100)
gzip -9 37.85s (293) 1.59s (96) 7959056 (99)
(bunzip2) 73.59s (570) 9.77s (592) 7281284 (91)
Using gzip -9 instead of gzip ends with a 4% gain in time, 1% in space,
and a loss of 193% in time for compression. This is a large loss for such
a tool if you use it for Cooker, as you have to rebuild the database
every day or so ;-)
BTW, if you leave the file uncompressed, it takes you a few miliseconds
to read it. It's just 2.6 times larger than gziped -9. Given the price of
hard disks today, the huge size of the Mandrake distribution, and the
fact that waiting in front of a computer is boring... Well... I would
really think about it (an option marked "save space" that uses gzip -9,
else use no compression at all). ;-)
--
Xavier