huffman-project package to reduce data based on character frequency
Project description
huffman-project
A python package to compress data based on character frequency
This repository contains files for huffman package and test files for it in tests/
directory.
Installation instructions
Clone the repo:
pip3 install huffman-project
Installation instructions (dev)
Clone the repo:
git clone git@github.com:M4verickFr/huffman-project.git
Then install the dependencies and install the package:
pip3 install -r requirements.txt
pip3 install -e .
Usage
Import huffman package.
from huffman import Huffman
Then use methods compress or comrpessFile.
h = Huffman()
h.compress("Bonjour!!")
h.compressFile(pathFile)
For examples of use, see the test folder.
Unit Test Case
You can run Unit Test Case with
python3 -m unittest tests/HuffmanTestCase.py
python3 -m unittest tests/TreeTestCase.py
All tests must be passed
License
This project is under the Apache 2.0 License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
huffman-project-0.2.2.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for huffman_project-0.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d8cc25d06d8f5a31e080e6a8c4add433ca3ab1eb7ab592425f3c2d89c053774a |
|
MD5 | 80326572aeaabb04bd3ec3b6dd393b74 |
|
BLAKE2b-256 | 1a2fc908b417bd1b528487d45bff2b881d9eb366f9db278d97ef5d5620bfbe96 |