PythonHuff


NamePythonHuff JSON
Version 1.0.4 PyPI version JSON
download
home_page
SummaryHuffman compression and decompression (Pure Python implementation)
upload_time2023-06-27 08:19:29
maintainer
docs_urlNone
author
requires_python
license
keywords huffman compression decompression algorithm
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <p><span><span style="font-family:Verdana, Arial, Helvetica, sans-serif;line-height:19px;text-indent:26px;"><span style="font-size:14px;"><span style="font-family:Arial;line-height:26px;"><br></span></span></span></span></p>

### Usage
```python
from pyhuff import compress
text=b'A'*100
print(text) # b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'
comp=compress(text)
print(comp) # b'\x041\x00A\x010\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'
```

Or use:
```commandline
pyhuff compress in.txt out.bin
pyhuff decompress out.bin dec.txt
```

### Disadvantages

1. The code is very messy because of compatibility of Python 2 (And I don't know the six package).
2. Decompression is very slow.
3. Not very good, sometimes the compressed file is larger than the original one. 


            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "PythonHuff",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "huffman,compression,decompression,algorithm",
    "author": "",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/20/fb/028dfd7074b0118edcb6fcc40b44b44c67bb0da4d5f0ba1b5efb8ac4df48/PythonHuff-1.0.4.tar.gz",
    "platform": null,
    "description": "<p><span><span style=\"font-family:Verdana, Arial, Helvetica, sans-serif;line-height:19px;text-indent:26px;\"><span style=\"font-size:14px;\"><span style=\"font-family:Arial;line-height:26px;\"><br></span></span></span></span></p>\r\n\r\n### Usage\r\n```python\r\nfrom pyhuff import compress\r\ntext=b'A'*100\r\nprint(text) # b'AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA'\r\ncomp=compress(text)\r\nprint(comp) # b'\\x041\\x00A\\x010\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00\\x00'\r\n```\r\n\r\nOr use:\r\n```commandline\r\npyhuff compress in.txt out.bin\r\npyhuff decompress out.bin dec.txt\r\n```\r\n\r\n### Disadvantages\r\n\r\n1. The code is very messy because of compatibility of Python 2 (And I don't know the six package).\r\n2. Decompression is very slow.\r\n3. Not very good, sometimes the compressed file is larger than the original one. \r\n\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Huffman compression and decompression (Pure Python implementation)",
    "version": "1.0.4",
    "project_urls": null,
    "split_keywords": [
        "huffman",
        "compression",
        "decompression",
        "algorithm"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2099f8f2dc0deff177e7b04a39e9f265e26ff21c62b15721bd99f9a1b0d3ee39",
                "md5": "a8d06316b0f13c6d9b20d38b721c9f51",
                "sha256": "084c99deba558fa393984e33c34af3e9a0f3b16461ac47f21f9645410281195b"
            },
            "downloads": -1,
            "filename": "PythonHuff-1.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "a8d06316b0f13c6d9b20d38b721c9f51",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4025,
            "upload_time": "2023-06-27T08:19:27",
            "upload_time_iso_8601": "2023-06-27T08:19:27.953162Z",
            "url": "https://files.pythonhosted.org/packages/20/99/f8f2dc0deff177e7b04a39e9f265e26ff21c62b15721bd99f9a1b0d3ee39/PythonHuff-1.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "20fb028dfd7074b0118edcb6fcc40b44b44c67bb0da4d5f0ba1b5efb8ac4df48",
                "md5": "0e0aea5670be455a9ea95d47a081f23d",
                "sha256": "042d7c736569940e481cb4f039e5a1594d144eca35125fb819c2264b408e3117"
            },
            "downloads": -1,
            "filename": "PythonHuff-1.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "0e0aea5670be455a9ea95d47a081f23d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3531,
            "upload_time": "2023-06-27T08:19:29",
            "upload_time_iso_8601": "2023-06-27T08:19:29.879318Z",
            "url": "https://files.pythonhosted.org/packages/20/fb/028dfd7074b0118edcb6fcc40b44b44c67bb0da4d5f0ba1b5efb8ac4df48/PythonHuff-1.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-06-27 08:19:29",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pythonhuff"
}
        
Elapsed time: 0.11756s