{"id":18322145,"url":"https://github.com/mrjake222/huffman_coding","last_synced_at":"2025-04-09T14:42:07.306Z","repository":{"id":132755533,"uuid":"504336859","full_name":"MrJake222/huffman_coding","owner":"MrJake222","description":"Adaptive Huffman coding in C++","archived":false,"fork":false,"pushed_at":"2022-06-21T08:07:17.000Z","size":4468,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-15T08:37:02.115Z","etag":null,"topics":["bitarray","compression-algorithm","cpp","huffman","linklist","vitter","vitter-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","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/MrJake222.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":"2022-06-16T23:44:50.000Z","updated_at":"2024-10-10T09:25:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"fd0d9f45-52aa-45dc-a803-656f499ca5cd","html_url":"https://github.com/MrJake222/huffman_coding","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrJake222%2Fhuffman_coding","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrJake222%2Fhuffman_coding/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrJake222%2Fhuffman_coding/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrJake222%2Fhuffman_coding/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrJake222","download_url":"https://codeload.github.com/MrJake222/huffman_coding/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248055275,"owners_count":21040151,"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":["bitarray","compression-algorithm","cpp","huffman","linklist","vitter","vitter-algorithm"],"created_at":"2024-11-05T18:23:20.985Z","updated_at":"2025-04-09T14:42:07.291Z","avatar_url":"https://github.com/MrJake222.png","language":"C++","readme":"# Adaptive Huffman coding in C++\n\n## Bits and pieces used\n* Vitter algorithm,\n* Own BitArray implementation (extensible array of bits implemented as a template over numeric types),\n* Own LinkList implementation as a template,\n* Own progress printer (simple ASCII one),\n* [CLI11](https://github.com/CLIUtils/CLI11) command line options parser,\n* [Google Test](https://github.com/google/googletest) for testing BitArray class,\n* Extracts from Wikipedia as test data.\n\n## Dependencies\n* CLI11 - header-only, provided with this project,\n* Google Test - ***needs to be installed locally***.\n\n## Limitations\n* Can't be used with binary files (uses null byte as terminating symbol, can be improved of course).\n\n## Usage\n### Quick test run\n```\n$ make -j4 runtests\n```\n\n### Help\n```\n$ ./main --help                                         \nAdaptive Huffman coding compressor/decompressor\nUsage: ./main [OPTIONS]\n\nOptions:\n  -h,--help                   Print this help message and exit\n  -p,--pack Excludes: --unpack\n                              Pack/compress\n  -u,--unpack Excludes: --pack\n                              Unpack/decompress\n  -s,--source TEXT REQUIRED   Source/input file\n  -d,--destination TEXT REQUIRED\n                              Destination/output file\n\nno action specified, use exactly one of pack/unpack options\n```\n\n### Encode\n```\n$ ./main --pack -s txt/5-passages-head_10M.txt -d out.bin\n```\n\n### Decode\n```\n$ ./main --unpack -s out.bin -d decoded.txt\n```\n\n## Results\nEffective for files as small as 1 KiB:\n```\nencoding: txt/1-passages-head_1K.tsv --\u003e out.bin\n[####################################################################################################] 100% done\nbytes input 1024 output 709\nsize reduction 30.76%\ntook 0.00s\n```\n\nSample run for 10MB:\n```\nencoding: txt/5-passages-head_10M.txt --\u003e out.bin\n[####################################################################################################] 100% done\nbytes input 10485760 output 6774613\nsize reduction 35.39%\ntook 0.85s\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrjake222%2Fhuffman_coding","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrjake222%2Fhuffman_coding","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrjake222%2Fhuffman_coding/lists"}