Created a program that uses greedy Huffman coding to compress text and share in a lossless manner. A user can input a text message, and the message will be encoded using Huffman encoding, and can be decoded back as well.
- Had read about lossless compression online, and wanted to implement the Huffman Encoding algorithm individually after understanding what it is primarily based on
- Read into what heaps are (max & min), a data structure I had not covered before
- Implemented a function to create max heaps required for Huffman encoding
- Implemented functions to encode and decode text messages via Huffman enoding & decoding
- Functions rely on concepts, such as recursion and depth first search (DFS), and data structures, such as lists, dictionaries, heaps, etc.
File named main should be downloaded and then ran as usual for any python program (either through an IDE, or through the terminal/CMD from the same directory as where file is downloaded)