Huffman Encoding

In this lesson, you will learn about prefix-free codes and the methodology of Huffman Encoding.

Huffman codes

There are four unique values in the grayscale image in Figure 11, so let’s give each one a variable length code 0, 1, 001, 11, as shown in Table 1. How did we assign these codes? We’ll discuss this a bit later in the lesson. On average, the required amount of storage would be 0.145 ×\times 1 ++ 0.400 ...

Figure 1:  A grayscale image represented by four grayscale values.
Figure 1: A grayscale image represented by four grayscale values.
Access this course and 1400+ top-rated courses and projects.