{"id":20324364,"url":"https://github.com/oniani/huffman","last_synced_at":"2025-03-04T10:21:16.480Z","repository":{"id":112156117,"uuid":"324443237","full_name":"oniani/huffman","owner":"oniani","description":"Huffman's algorithm for lossless data compression","archived":false,"fork":false,"pushed_at":"2021-07-11T22:20:25.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-02T10:08:12.163Z","etag":null,"topics":["compression","huffman-coding","huffman-compression-algorithm","rust","serde-json"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/oniani.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":"2020-12-25T22:33:46.000Z","updated_at":"2023-03-06T07:55:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"77458ece-64a2-4677-8e93-4613287744d4","html_url":"https://github.com/oniani/huffman","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/oniani%2Fhuffman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fhuffman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fhuffman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oniani%2Fhuffman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oniani","download_url":"https://codeload.github.com/oniani/huffman/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241827452,"owners_count":20026688,"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":["compression","huffman-coding","huffman-compression-algorithm","rust","serde-json"],"created_at":"2024-11-14T19:33:42.896Z","updated_at":"2025-03-04T10:21:16.455Z","avatar_url":"https://github.com/oniani.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Huffman\n\nA pure Rust implementation of the Huffman's algorithm for lossless data\ncompression.\n\n## Dependencies\n\n- [serde_json](https://docs.rs/serde_json/1.0.59/serde_json/index.html)\n\n## Run\n\n```sh\n# Build the program\ncargo build --release\n\n# Compression.\n# `message.txt` is a file to be encoded, `encoding.txt` is a Huffman\n# compression. After a successful run, there should be a file `metadata.json`\n# which one. could think of as a key for decoding/decompression the\n# encoding/compression.\n./target/release/huffman message.txt encoding.txt\n\n# Decompression.\n# Make sure `metadata.json` is in the current directory.\n# `encoding.txt` is the encoding that was generated in the previous step.\n# `decoding.txt` should be a dcompression of `encoding.txt`.\n# Notice that `decompress(compress(file)) = file` and hence, `decoding.txt`\n# must have the same contents as `message.txt`.\n# `--decompress` argument tells the program that the decompression mode is on.\n./huffman encoding.txt decoding.txt --decompress\n```\n\n## Tests\n\n```\ncargo test --release\n```\n\n## References\n\n- [Huffman coding](https://en.wikipedia.org/wiki/Huffman_coding)\n\n## License\n\n[MIT License](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fhuffman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foniani%2Fhuffman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foniani%2Fhuffman/lists"}