Why Lempel-Ziv77 - "sliding window" algorithm uses a fixed length code for the buffer u?

51 Views Asked by At

I am a final year ECE student from Greece, studying about Information Theory a question came up.

In the definition/description of LZ77 (Lempel-Ziv's algorithm), following is noted:

"If n > 1, encode the positive integer u ≤ w using a fixed-length code of length log w bits."

LZ77_prntscreen

My question is: Why using a fixed-length code and not a variable one? (such as a prefix free or any other uniquely decodable one?).

Source of original lecture in English: http://users.ece.northwestern.edu/~rberry/ECE428/Lectures/lec8_notes.pdf

1

There are 1 best solutions below

2
On

If you know $u\leq w$ using a fixed length code is usually much simpler. Just use the bit representation of $u$. And it makes no difference to the overall efficiency of the LZ77 scheme.