{"id":18961557,"url":"https://github.com/your-vo1d/huffman_encoding_decoding","last_synced_at":"2026-04-01T14:30:21.661Z","repository":{"id":212341456,"uuid":"731269427","full_name":"Your-vo1d/Huffman_encoding_decoding","owner":"Your-vo1d","description":"This repository provides an implementation of a compression algorithm of this type, the Huffman algorithm. This algorithm is implemented in the Python programming language.","archived":false,"fork":false,"pushed_at":"2024-04-12T13:45:42.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-01T04:50:42.749Z","etag":null,"topics":["huffman","huffman-algorithm","huffman-coding","huffman-coding-algorithm","huffman-compression-algorithm","huffman-decoder","huffman-encoder","huffman-tree"],"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/Your-vo1d.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}},"created_at":"2023-12-13T17:47:39.000Z","updated_at":"2024-07-04T10:22:10.000Z","dependencies_parsed_at":"2023-12-20T07:36:13.386Z","dependency_job_id":"3be82827-8fb6-4708-ac40-5c6a1b42cb6a","html_url":"https://github.com/Your-vo1d/Huffman_encoding_decoding","commit_stats":null,"previous_names":["your-vo1d/lab_compress","your-vo1d/huffman_encoding_decoding"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Your-vo1d%2FHuffman_encoding_decoding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Your-vo1d%2FHuffman_encoding_decoding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Your-vo1d%2FHuffman_encoding_decoding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Your-vo1d%2FHuffman_encoding_decoding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Your-vo1d","download_url":"https://codeload.github.com/Your-vo1d/Huffman_encoding_decoding/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239958283,"owners_count":19724925,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["huffman","huffman-algorithm","huffman-coding","huffman-coding-algorithm","huffman-compression-algorithm","huffman-decoder","huffman-encoder","huffman-tree"],"created_at":"2024-11-08T14:13:16.469Z","updated_at":"2026-04-01T14:30:21.589Z","avatar_url":"https://github.com/Your-vo1d.png","language":"Python","readme":"# Huffman Coding\n\nThis Python script provides functions for compressing and decompressing text files using Huffman coding.\n\n## Usage\n\n1. Ensure you have Python installed on your system.\n2. Clone this repository to your local machine.\n3. Open a terminal or command prompt and navigate to the directory containing the script.\n4. Run the script by executing the command: `python main.py`.\n5. Follow the on-screen instructions to compress or decompress text files.\n\n## Description\n\n### `huffman_coding.py`\n\nThis script contains the following functions:\n\n- `build_huffman_tree_from_codes`: Builds a Huffman tree from a dictionary of Huffman codes.\n- `build_huffman_tree`: Builds a Huffman tree from a given text.\n- `build_huffman_codes`: Builds Huffman codes for each character in the tree.\n- `compress`: Compresses a given text file using Huffman coding.\n- `decompress`: Decompresses a compressed file back to its original form.\n\n## Example\n\nSuppose you have a text file named `example.txt` that you want to compress. You can use this script as follows:\n\n1. Run the script and provide the name of the file (`example.txt`) when prompted.\n2. The script will compress the file and save the compressed version as `compressed.txt` in the `result` directory.\n3. To decompress the file, run the script again and select the compressed file (`compressed.txt`) when prompted.\n4. The script will decompress the file and save the decompressed version as `decompressed.txt` in the `result` directory.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyour-vo1d%2Fhuffman_encoding_decoding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyour-vo1d%2Fhuffman_encoding_decoding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyour-vo1d%2Fhuffman_encoding_decoding/lists"}