Mailing List Archive


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

Re: [tlug] Apache: Logging: how-to pipe logs or logtoanothermachine(was Disk



On Sun, 2002-09-08 at 15:49, Jean-Christian Imbeault wrote:
> >From: Bruno Raoult <br@example.com>
> >
> >gzip uses (with others) lzw
> >compression which does not need EOF.
> 
> If I may ask, how can compression be done efficiently if you can look at the 
> whole data beforehand?
> 
> Does this mean that newer data is not compressed as efficently as older 
> daata (age in terms of when it comes through the pipe)

LZW (or similar) have very good compression rates, and the more you can
find repetitive patterns in the input file, the more the file is
compressed.
As an example, if you have a 128-bytes strings repeated, the second one
will be compressed in one LZW current character size (for instance 10
bits - this value is changing [increasing] during the compression
process).
The third one too.

If you have four successive identical strings (in a row), the second one
will be one LZW unit, and the 3-4 together will be 1 also. Of course
this is a simple explanation, and I don't pretend to explain really the
algorithm here - just to prevent an useless thread from here :-)

br.

-- 
GPG Key: 653514E5 (http://www.raoult.com/gpg)
--
Real Men do not use signatures.

Attachment: signature.asc
Description: This is a digitally signed message part


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links