Huffman Coding Compression and Decompression Tool
I developed a Python program to compress and decompress text files using Huffman Coding, achieving significant file size reduction and improving storage efficiency, and implemented frequency analysis to create a dictionary of character frequencies from the input text, facilitating the construction of the Huffman Tree by providing the necessary data for priority-based node creation. Also, I built a min-heap and Huffman tree by leveraging the frequency dictionary, combining nodes with the lowest frequencies to form the tree, and assigning optimal binary codes to each character, thus minimizing redundancy and maximizing compression. Encoded text into a compressed binary format by using the generated Huffman codes, padding the encoded text to ensure it is a multiple of 8 bits, and converting it into byte arrays for efficient storage in a binary format. Accurately decompressed files by reading the compressed binary file, removing the padding to retrieve the original encoded text, and decoding the binary data back to the original text using the reverse of the Huffman codes, ensuring data integrity and correctness.