Disclaimer: This is an example of a student written essay.
Click here for sample essays written by our professional writers.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of UKEssays.com.

# What is Huffman Encoding and why is it important?

 ✅ Paper Type: Free Essay ✅ Subject: Computer Science ✅ Wordcount: 893 words ✅ Published: 18th Oct 2021

## Huffman Encoding:

Huffman Encoding is an algorithm where optimal prefix code is used for compressing data without losing information. Here prefix code means the unique bit sequence assigned to each character to prevent ambiguity while decoding the generated bitstream.

### Importance of Huffman Encoding:

As we know, information is encoded as bit sequence of 0's and 1's to make it computer readable. Video, photograph, games-everything in computer is processed or encoded as bit strings. Each string of bits contains information. Thus, billions of instructions containing information are needed to be executed for a single video or game. But if somehow it becomes possible to compress data, then the time needed for the instructions to be executed can be reduced. That will result in the reduction of required space in computer for holding data along with the reduction of execution time. So, the less the size of the string or bit sequence, the faster and more efficient the process becomes. But this benefit can only be enjoyed if there is no information loss and also no ambiguity in decoding the generated bitstream. Huffman encoding does exactly that by compressing data without losing any information and reducing the required space and execution time without causing an ambiguity.

Get Help With Your Essay

If you need assistance with writing your essay, our professional essay writing service is here to help!

The amount of data needed to represent the same amount information may vary. In other words, we can change the amount of information we need to represent the information. Suppose we have an image of size 1200x1600 which means it will consume 1200x1600x3 byte = 5760000 byte or 5.76 Mbyte. This size for an image is by no means small. Now let us consider a movie of size 720x480 with duration of 2 hours where each frame took about 31,104,000 bytes running at 30 frames per second, So the total consumption will be 2.24x10^11 bytes or 224GByte. But we do not see movies of 224 GB in use. Generally, even a 1080p movie around 2 hours in length would be around 10 Gb. This is possible only with the help of data compression. In image processing, 8-bit codes are used to represent the intensities of an image. But all these bits are not required to represent the image properly. These extra bits can be removed without affecting the outcome at all since the same intensity often repeat itself multiple times. So, using the large 8-bit code each time to represent the same intensity is quite inefficient when all 256 codes do not even appear in the same image or video (since with 8 bit-code 2^8 = 256 intensities can be represented). By analyzing the frequencies, we often see that certain code appear in an image or entity quite repeatedly. By encoding it with shorter bit string while codes that are rare by encoding them using longer strings the solution can be optimized.

Huffman encoding reduces the amount of data by utilizing the present data in the best way possible. The data which are no longer required is called redundant data in image processing. So, all the redundant data are disposed, and, in the process, reduces the amount of data used, also all the intensities are uniquely represented with no possibilities of ambiguity. Thus, Huffman encoding is proven to be efficient and important for compressing image or other such entities.

## Cite This Work

To export a reference to this article please select a referencing stye below:

View all

## DMCA / Removal Request

If you are the original writer of this essay and no longer wish to have your work published on UKEssays.com then please:

Related Services

Prices from

KD47

Approximate costs for:

• 1000 words
• 7 day delivery

Humanity University

Dedicated to your worth and value as a human being!

Related Lectures

Study for free with our range of university lectures!

Freelance Writing Jobs

Looking for a flexible role?
Do you have a 2:1 degree or higher?

Study Resources

Free resources to assist you with your university studies!