Skip to content

This project implements Huffman Coding, a lossless data compression algorithm, in the C/C++ programming language.

Notifications You must be signed in to change notification settings

mdthabrez/huffman-coding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 

Repository files navigation

Huffman Coding

This project implements Huffman Coding, a lossless data compression algorithm, in the C/C++ programming language.

Huffman Coding efficiently compresses data by assigning variable-length codes to input characters, with shorter codes assigned to more frequently occurring characters. This results in reduced storage space for the encoded data while preserving its original content.

Technologies and Concepts Used

C
C++
Graphs
Min Heap
Huffman Tree

Features

  • Encoding: Converts a given text file into a compressed binary file using Huffman Coding.
  • Decoding: Decompresses a Huffman-encoded binary file back into its original text format.
  • Min Heap Data Structure: Optimizes the construction of the Huffman tree, a crucial step in the encoding and decoding processes.

Advanced Data Structures Used

Graphs

Graphs can be used to represent the relationship between multiple entities. We can convert the data into graph nodes and run the necessary queries to find the answers.

Min Heap

Implemented as a binary heap, it ensures that the characters with the lowest frequencies are always at the root.

Huffman Tree

It is a binary tree used in Huffman coding, where characters with higher frequencies are closer to the root, enabling efficient encoding and decoding of data by assigning shorter codes to more frequent characters. It dynamically organizes characters based on their frequencies, ensuring optimal compression while preserving the original data.

What did I learn in this project?

  • Implementing Advanced Data Structures like Graphs and Min Heap using C/C++.
  • Encoding and Decoding Methodologies using Huffman Coding.

🔗 Contact

Mohammed Thabrez G

linkedin

About

This project implements Huffman Coding, a lossless data compression algorithm, in the C/C++ programming language.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published