PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] length of codes in LZW
Date: Sunday, 11 Oct 2020, 21:37:04


    > Message Posted By: Unknown
    >
    > In a Huffman code we can send over short bits as a code (e.g., 011 or
    > 1011) and not all of the codes are the same size correct? In particular,
    > the codes can have a different number of bits so we send short codes for
    > more frequent chars and longer codes for less frequent.

Correct.
=====

    > Why can we not send different lengths of codes in the LZW table then? Why
    > must all codes have the same number of bits?

Because the LZW codes do not have the same prefix
property (i.e., no code is a prefix of another).

--Stan-
PREV INDEX NEXT