{"id":15701032,"url":"https://github.com/abdallahhemdan/huffman-coding-compression","last_synced_at":"2025-08-31T19:44:25.099Z","repository":{"id":111034375,"uuid":"181555668","full_name":"AbdallahHemdan/Huffman-Coding-Compression","owner":"AbdallahHemdan","description":"📦 Huffman Coding Compression Algorithms with Encoding and Decoding using C++","archived":false,"fork":false,"pushed_at":"2019-04-15T20:16:49.000Z","size":4986,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-12T15:52:40.071Z","etag":null,"topics":["binary-tree","compression-algorithm","cpp","data-structures","huffman-coding","huffman-compression-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbdallahHemdan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-04-15T19:52:25.000Z","updated_at":"2022-08-12T16:24:00.000Z","dependencies_parsed_at":"2024-03-15T17:16:28.188Z","dependency_job_id":null,"html_url":"https://github.com/AbdallahHemdan/Huffman-Coding-Compression","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AbdallahHemdan/Huffman-Coding-Compression","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdallahHemdan%2FHuffman-Coding-Compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdallahHemdan%2FHuffman-Coding-Compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdallahHemdan%2FHuffman-Coding-Compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdallahHemdan%2FHuffman-Coding-Compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbdallahHemdan","download_url":"https://codeload.github.com/AbdallahHemdan/Huffman-Coding-Compression/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbdallahHemdan%2FHuffman-Coding-Compression/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273032930,"owners_count":25034067,"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","status":"online","status_checked_at":"2025-08-31T02:00:09.071Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["binary-tree","compression-algorithm","cpp","data-structures","huffman-coding","huffman-compression-algorithm"],"created_at":"2024-10-03T19:58:38.296Z","updated_at":"2025-08-31T19:44:25.053Z","avatar_url":"https://github.com/AbdallahHemdan.png","language":"C++","readme":"## 📦Huffman Coding Compression\n\nHuffman encoding is a way to assign binary codes to symbols that reduces\nthe overall number of bits used to encode a typical string of those symbols.\n\nAs we all knowe each char stored in 8-bit of 0's and 1's which \ncalled ```fixed-length-encoding``` as we use the same number of bits to any char .\n\nThe idea of Huffman-Coding-Algorithm is to ```use variable-length-encoding``` +  using the fact\nthat some chars occurs more freq than others\n\nSo we assign ```variable-number``` of bits to each char based on its freq in the text.\n\nOur main problem is in decoding the text \nOur solution is to use what called (Prefix Rule) which will result into \n(uniquely-decodable-codes) ==\u003e \"No Code is Prefix to another Code\".\t\n\n```\nExample : we have Str = \"aabacdab\" \n\ta\t-\u003e        0 \n\tb\t-\u003e\t  10\n\tc\t-\u003e\t  110\n\td\t-\u003e\t  111\n```\n```\nthen Str = 00100110111010\n```\n\n\n![625px-Huffman_tree_2 svg](https://user-images.githubusercontent.com/40190772/56161841-ddc1aa00-5fca-11e9-97e8-80d539afa610.png)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdallahhemdan%2Fhuffman-coding-compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdallahhemdan%2Fhuffman-coding-compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdallahhemdan%2Fhuffman-coding-compression/lists"}