A python project to compress data based on character frequency
Huffman coding is a lossless data compression algorithm. Huffman coding uses a variable length code to represent a symbol from the source (for example a character in a file).
This repository contains files for huffman package and test files for it in tests/
directory.
Clone the repositories:
git clone [email protected]:caullird/proj631-huffman.git
With a string of characters :
HuffmanCompress("ProjetAlgorithmique", debug = True)
With a text file (put the txt file in data/initial_data
HuffmanCompress("fichier.txt",debug = True)
You can then see the results with the debug mode or in the 'data/result_data'
You can run Unit Test Case with
python3 -m unittest tests/HuffmanTest.py
All tests must be passed