compress or decompress with huffman
Project description
Install from source:
- $ python setup.py build
- $ python setup.py install
Usage:
- compress & decompress:
python example:
#-*- coding:utf-8 -*-
import PycHuffman as huffman
def run_test():
file_in = 'original_file.jpg'
file_out = 'compressed_file.hum.bin'
file_out_out = 'decompressed_file.hum.jpg'
rtn = huffman.compress(file_in, file_out)
print('compress return:', rtn)
rtn = huffman.decompress(file_out, file_out_out)
print('decompress return:', rtn)
if __name__ == '__main__':
run_test()
Upload PyPI
- $ python -m pip install --user --upgrade setuptools wheel twine
- $ python setup.py sdist bdist_wheel
- $ python -m twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
Upload TestPyPI
- $ python -m pip install --user --upgrade setuptools wheel twine
- $ python setup.py sdist bdist_wheel
- $ python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
- $ python -m pip install --index-url https://test.pypi.org/simple/ --no-deps PycHuffman
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
PycHuffman-1.1.0.tar.gz
(4.5 kB
view hashes)
Built Distribution
Close
Hashes for PycHuffman-1.1.0-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4c39e9fc91fe0ba9f6bd95f4e126e76844f59900504e1fcccbb1fee28a30b134 |
|
MD5 | 7e1d40be685a2ee410c9fe8cb0167cfb |
|
BLAKE2b-256 | bb608017edd91db9a183189cb8c8276c351b8a8abc074b5cff025c878e7445ae |