On Thu, Apr 3, 2008 at 8:37 PM, Rob Dixon <[EMAIL PROTECTED]> wrote:
snip
>  > * Note, this is not real Huffman encoding, just Larry Wall's version of it.
>
>  Huffman encoding is a compression algorithm, used in GIF files if I
>  remember correctly. It's not relevant to human-readable text. If you're
>  anxious to make your programs as quick to type as possible then you
>  should start by removing all whitespace.
snip

Note the footnote.  Real Huffman encoding is a compression algorithm,
but GIF uses LZW (the same basic algorithm behind gzip and a bunch of
other lossless encryption schemes).  When you understand how Huffman
encoding works you will understand the analogy being used.  Whitespace
is very inexpensive in terms of keystrokes, if you are using a decent
editor, and serves several very important functions.  The each in
foreach serves little to no purpose and I, at least, tend to use a lot
of for loops (iterator style, not the hated c-style).

from http://www.perl.com/pub/a/2007/12/06/soto-11.html?page=2 by Larry Wall
    Each symbol has to justify its existence according to Huffman coding.

-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to