Skip to content

๐ŸŽ“ School project - The objective of this project is to compress a file using the Huffman algorithm

Notifications You must be signed in to change notification settings

caullird/huffman-compression

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

89 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

proj631-huffman

A python project to compress data based on character frequency

Explanation of the algorithm

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).

image

This repository contains files for huffman package and test files for it in tests/ directory.

Installation instructions (dev)

Clone the repositories:

git clone git@github.com:caullird/proj631-huffman.git

Usage

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'

Unit Test Case

You can run Unit Test Case with

python3 -m unittest tests/HuffmanTest.py

All tests must be passed

About

๐ŸŽ“ School project - The objective of this project is to compress a file using the Huffman algorithm

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Languages