Gzip better than Bz2 ? Normal?

Donald Arseneau asnd at triumf.ca
Tue Jan 3 04:24:33 UTC 2006


Mike McCarty <mike.mccarty at sbcglobal.net> writes:

> There are lossless compression algorithms for which what you
> said is not true.

I can't believe that.  You can have a one-bit flag to indicate
compression on or off.  If the compression algorithm produces
more output than input, then you can save the flag "0" plus the 
original file contents.  If the compression is an improvement then 
you save the flag "1" plus the compressed data.  So successfully
compressed files are one bit larger than they could have been,
with the benefit that uncompressible files do not get bloated by
more than one bit.





-- 
Donald Arseneau                          asnd at triumf.ca




More information about the fedora-list mailing list