Following data compression algorithms used to compress a sample text file:
- Binary Huffman
- Ternary Huffman
- Arithmetic
- LZ coding
Run compare_algorithms.m to take results of each compression algorithm (# of bits before and after compression) and see the compression rates in a graph, or run the funtions individually if you want specific algorithm's result.
I used a sample text from The Count of Monte Cristo, chapter 19.