Q. Please tell me, Sensei, what are some common algorithms for data compression?
A. One common algorithm is Lempel-Ziv, which is used by zip, pkzip and gzip.
Q. What is bzip?
A. Bzip is a drop-in replacement for gzip. It achieves better compression in many cases but is somewhat slower, and there is concern that it may violate patented algorithms. For this reason, it is unclear whether it will gain acceptance.
Q. What is Zen compression?
A. Chuang-Tzu said that it is impossible to lengthen the legs of a duck, nor to shorten the legs of a crane. Yet both the duck and the crane are hatched from the egg. That is what is meant by Zen compression.
Q. Can you give an example illustrating different methods of compression?
A. Certainly. We begin with the text ``What is the sound of one hand clapping?'' We write this to a file, then encode it using gzip. We arrive at the following compressed text:
^_\x8b^H^H\x89\xb5\x843^@^Ckoan ^@^K\xcfH,Q\xc8,V(\xc9HU(\xce/\xcdKQ\xc8OS\xc8\xcfKU\xc8H^D\xb2\x93s^R^K 2\xf3\xd2\xed\xb9^@\x8a\xb1 \xc7(^@^@^@
That is using the Lempel-Ziv algorithm. Using Zen compression, we obtain the following compressed version of the same text: "A."
Q. That's it??? Just "A"? Surely there is some loss of information here!
A. No. Read it again.
Q. Aiiee!!! You're right!!! It's all there!!! I am the Buddha-Nature!!!
Back to Daniel Bump's Other Home Page