Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
We don't bite newbies here... much
 
PerlMonks  

Re^3: When should a wheel be reinvented

by demerphq (Chancellor)
on Jun 30, 2004 at 14:05 UTC ( [id://370853]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


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

BTW, Huffman coding is a lousy

I think I know why you say that, but Id like to know more...

Also, it can be fun: A Golf question maybe? Huffman with a twist, New Huffman Obfus, A Brainteaser -- Huffman with a twist, New Huffman Obfus, Huffman encoder, Huffman decoder

Actually I solved the "with a twist" problems long ago, and in linear time iirc, but for some reason I never got around to following up on them. Maybe ill dig out the solution and post it now that you have reminded me.


---
demerphq

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


  • Comment on Re^3: When should a wheel be reinvented

Replies are listed 'Best First'.
Re^4: When should a wheel be reinvented
by ysth (Canon) on Jun 30, 2004 at 14:12 UTC
    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.

      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://370853]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.