Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re^4: When should a wheel be reinvented

by ysth (Canon)
on Jun 30, 2004 at 18:12 UTC ( [id://370858]=note: print w/replies, xml ) Need Help??


in reply to Re^3: When should a wheel be reinvented
in thread When should a wheel be reinvented

Huffman coding (with a translation table tailored to the data) guarantees the least number of generated bits possible while encoding each character (or whatever the input unit is) separately. But in most data, there is some correlation of each character to the ones around it that can be used to achieve better compression.
  • Comment on Re^4: When should a wheel be reinvented

Replies are listed 'Best First'.
Re^5: When should a wheel be reinvented
by demerphq (Chancellor) on Jun 30, 2004 at 18:17 UTC

    Right. Also transmitting the table is inefficient as well (although there is always adaptive huffman encoding, which i never got around to implementing). But you may find LZW Demystified and RFC: Compress::LZW interesting. :-)

    Actually in my experiments my implementation is more efficient than straight LZW because it doesnt lose bits by packing things into words. But that also means its not binary compatible which makes it more or less useless.


    ---
    demerphq

      First they ignore you, then they laugh at you, then they fight you, then you win.
      -- Gandhi


Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://370858]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2024-04-18 20:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found