octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: huffmandict: Matlab compatibility, Matlab bugs..


From: Simon Persson
Subject: Re: huffmandict: Matlab compatibility, Matlab bugs..
Date: Thu, 5 Oct 2006 22:34:58 +0200
User-agent: KMail/1.9.4

On Thursday 05 October 2006 21:59, Muthiah Annamalai wrote:
> Hi there,
> Im trying to write some functions in Matlab communication toolbox
> (source coding functions) for Octave forge.
>
> While I was doing that, I came across a funny bug in Matlab.
>
> Huffman encoding is done in 2 steps (according to Matlab),
> and the first step generates dictionary.
> Essentially all Huffman coding does it map low probability symbols
> to long codewords and vice-verca.
>
>  So the wierd thing (in Matlab impl) is that for 0-probability symbols
> have long code words assigned to them. I wonder... why someone will
> infact even have a zero probability symbols occur in their data?
>

Maybe someone wants to estimate probabilites from a smaller sample than the 
full data to be encoded. Then codes for all symbols are still needed even if 
they don't occur in the analysed sample. That's the only reason I can think 
of.

Simon

Attachment: pgp6NFw4GUc5U.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]