Huffman Encoder

Over the summer, I worked on several small projects with a close friend of mine, Josh. This script takes text files as inputs, creates a Huffman tree and special binary, and outputs it as a text file. Another script is able to read that tree and convert it back to the text file. For high-frequency characters, the length of the binary will be much shorter. Clicking these images redirects to text documents, but you can also see some more on my github.

Text File:
Lorem ipsum dolor sit amet, consectetur adipiscing elit...

 Binary:
0100111100011010001001111001011111111010100111011110010...

 Tree:
J18
H18
G18
,36
B36
O54
...

 Log:
st5File size: 278350
Estimated time greater than: 175.0131602228219 seconds.
Simulated on 2.3 GHz Intel Core i5
Time to run: 181.8859670162201
Initial bits in file: 2226800
Final bits in file: 1176086
Compression ratio: 1.8933989521174472
Huffman tree size: 2040 bits
Total size: 1178126
Transfer cutdown to: 53 %