{"id":20652464,"url":"https://github.com/thesofakillers/huffman-coding","last_synced_at":"2026-04-21T11:01:32.518Z","repository":{"id":70961862,"uuid":"163134170","full_name":"thesofakillers/Huffman-Coding","owner":"thesofakillers","description":"Huffman Encoding and Decoding in Python","archived":false,"fork":false,"pushed_at":"2020-06-08T08:39:09.000Z","size":6579,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-05-07T19:03:32.100Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thesofakillers.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-12-26T03:58:15.000Z","updated_at":"2024-10-19T03:19:43.000Z","dependencies_parsed_at":"2023-08-28T15:15:36.070Z","dependency_job_id":null,"html_url":"https://github.com/thesofakillers/Huffman-Coding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thesofakillers/Huffman-Coding","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2FHuffman-Coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2FHuffman-Coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2FHuffman-Coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2FHuffman-Coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thesofakillers","download_url":"https://codeload.github.com/thesofakillers/Huffman-Coding/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thesofakillers%2FHuffman-Coding/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32088913,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T06:27:27.065Z","status":"ssl_error","status_checked_at":"2026-04-21T06:27:21.250Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-16T17:35:05.921Z","updated_at":"2026-04-21T11:01:32.501Z","avatar_url":"https://github.com/thesofakillers.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Huffman Coding\n\nOriginally made for my University's Department of Computer Science's course _Software Methodologies_ under the sub-module _Digital Communications_, as part of the coursework in 2017/2018.\n\nThis repository contains an implementation of [Huffman Coding](https://en.wikipedia.org/wiki/Huffman_coding) for .txt files.\n\nI have included the .txt files I have tested my implementation on in the same directory for ease of use, since the script and the files you wish to encode are to be in the same directory for it to work smoothly.\n\n## Requirements\n\nThis project was made utilizing [Python 3.6](https://www.python.org/downloads/release/python-360/) and should work with all 3.X versions.\n\nIn addition, please ensure that the following modules are installed:\n\n-   [bitstring](https://pypi.org/project/bitstring/)\n-   [NumPy](http://www.numpy.org/)\n\n## Instructions\n\n### Encoding\n\nTo encode a file, please:\n\n1.  Open a console window and navigate to a directory containing huffman.py and the plain text document file you wish to encode using the cd command\n2.  type `python huffman.py e filename.txt` where `filename.txt` is to be replaced by the name of the file you wish to encode.\n\nA file `filename.hc` should appear in the same directory, ready for decoding\n\n### Decoding\n\nTo decode a file, please:\n\n1.  Open a console window and navigate to a directory containing huffman.py and the .hc file you wish to decode located using the cd command. Ensure that the .hc file was in fact created by huffman.py and not some other script.\n2.  type `python huffman.py d filename.hc` where `filename.hc` is to be replaced by\n    the name of the file you wish to encode.\n\nA file `filename decoded.txt` should appear in the directory.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesofakillers%2Fhuffman-coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesofakillers%2Fhuffman-coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesofakillers%2Fhuffman-coding/lists"}