For Programmers: Free Programming Magazines  


Home > Archive > Compression > September 2006 > Huffman codes and saving









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Huffman codes and saving
houston

2006-09-26, 6:55 pm

Thought I'd stick this into a new topic... I'm wanting to know of any
good methods for saving Huffman trees! either with or without the
weights.. Also a question can any Huffman tree be made into a canonical
form? I fail to see how an optimal Huffman tree can be made into one
if you have for example 15 codes of the same length? surly you would
have to expand the code lengths?


Graham.

Matt Mahoney

2006-09-26, 6:55 pm

houston wrote:
> Thought I'd stick this into a new topic... I'm wanting to know of any
> good methods for saving Huffman trees! either with or without the
> weights.. Also a question can any Huffman tree be made into a canonical
> form? I fail to see how an optimal Huffman tree can be made into one
> if you have for example 15 codes of the same length? surly you would
> have to expand the code lengths?
>
>
> Graham.


You only need to save the number of bits assigned to each symbol. From
this you can reconstruct the rest of the code.

-- Matt Mahoney

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com