{"id":27214591,"url":"https://github.com/rocq-community/huffman","last_synced_at":"2026-03-27T04:12:04.866Z","repository":{"id":37028459,"uuid":"57215708","full_name":"rocq-community/huffman","owner":"rocq-community","description":"Correctness proof of the Huffman coding algorithm in Coq [maintainer=@palmskog]","archived":false,"fork":false,"pushed_at":"2023-12-30T00:35:06.000Z","size":1162,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T15:06:59.008Z","etag":null,"topics":["coq","coq-extraction","coq-nix-toolbox","docker-coq-action","huffman-coding","huffman-tree","ocaml"],"latest_commit_sha":null,"homepage":"https://coq-community.org/huffman/","language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rocq-community.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}},"created_at":"2016-04-27T13:31:49.000Z","updated_at":"2023-08-19T17:31:47.000Z","dependencies_parsed_at":"2023-11-19T18:46:04.601Z","dependency_job_id":"f27167ab-c1d6-4886-ac8c-c3b7e49d1993","html_url":"https://github.com/rocq-community/huffman","commit_stats":null,"previous_names":["rocq-community/huffman"],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocq-community%2Fhuffman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocq-community%2Fhuffman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocq-community%2Fhuffman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rocq-community%2Fhuffman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rocq-community","download_url":"https://codeload.github.com/rocq-community/huffman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248149606,"owners_count":21055792,"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":["coq","coq-extraction","coq-nix-toolbox","docker-coq-action","huffman-coding","huffman-tree","ocaml"],"created_at":"2025-04-10T03:24:30.479Z","updated_at":"2026-03-27T04:12:04.860Z","avatar_url":"https://github.com/rocq-community.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!---\nThis file was generated from `meta.yml`, please do not edit manually.\nFollow the instructions on https://github.com/coq-community/templates to regenerate.\n---\u003e\n# Huffman\n\n[![Docker CI][docker-action-shield]][docker-action-link]\n[![Contributing][contributing-shield]][contributing-link]\n[![Code of Conduct][conduct-shield]][conduct-link]\n[![Zulip][zulip-shield]][zulip-link]\n\n[docker-action-shield]: https://github.com/rocq-community/huffman/actions/workflows/docker-action.yml/badge.svg?branch=master\n[docker-action-link]: https://github.com/rocq-community/huffman/actions/workflows/docker-action.yml\n\n[contributing-shield]: https://img.shields.io/badge/contributions-welcome-%23f7931e.svg\n[contributing-link]: https://github.com/coq-community/manifesto/blob/master/CONTRIBUTING.md\n\n[conduct-shield]: https://img.shields.io/badge/%E2%9D%A4-code%20of%20conduct-%23f15a24.svg\n[conduct-link]: https://github.com/coq-community/manifesto/blob/master/CODE_OF_CONDUCT.md\n\n[zulip-shield]: https://img.shields.io/badge/chat-on%20zulip-%23c1272d.svg\n[zulip-link]: https://coq.zulipchat.com/#narrow/stream/237663-coq-community-devs.20.26.20users\n\n\n\nThis projects contains a Rocq proof of the correctness of the Huffman coding algorithm,\nas described in David A. Huffman's paper A Method for the Construction of Minimum-Redundancy\nCodes, Proc. IRE, pp. 1098-1101, September 1952.\n\n## Meta\n\n- Author(s):\n  - Laurent Théry (initial)\n  - Karl Palmskog [\u003cimg src=\"https://zenodo.org/static/images/orcid.svg\" height=\"14px\" alt=\"ORCID logo\" /\u003e](https://orcid.org/0000-0003-0228-1240)\n- Rocq-community maintainer(s):\n  - Karl Palmskog ([**@palmskog**](https://github.com/palmskog))\n- License: [GNU Lesser General Public License v2.1 or later](LICENSE)\n- Compatible Rocq/Coq versions: 8.12 or later\n- Additional dependencies: none\n- Rocq/Coq namespace: `Huffman`\n- Related publication(s):\n  - [Formalising Huffman's algorithm](https://hal.archives-ouvertes.fr/hal-02149909) \n  - [A Method for the Construction of Minimum-Redundancy Codes](http://compression.ru/download/articles/huff/huffman_1952_minimum-redundancy-codes.pdf) doi:[10.1109/JRPROC.1952.273898](https://doi.org/10.1109/JRPROC.1952.273898)\n\n## Building and installation instructions\n\nThe easiest way to install the latest released version of Huffman\nis via [OPAM](https://opam.ocaml.org/doc/Install.html):\n\n```shell\nopam repo add rocq-released https://rocq-prover.org/opam/released\nopam install coq-huffman\n```\n\nTo instead build and install manually, do:\n\n``` shell\ngit clone https://github.com/rocq-community/huffman.git\ncd huffman\nmake   # or make -j \u003cnumber-of-cores-on-your-machine\u003e \nmake install\n```\n\n\n## Documentation\n\nFor more information about the project, see the [technical report][techreport]\ndescribing the formalization. \n\n### Running extracted code\n\nTo extract code and obtain the program, run\n```shell\nmake run_huffman.ml\n```\n\nNext, open an OCaml toplevel (e.g., `ocaml`) and do\n```ocaml\n#use \"run_huffman.ml\";;\n```\n\nTo get the code that gives the frequency string:  \n```ocaml\nlet code = huffman \"abbcccddddeeeee\";;\n```\n\nTo code a string:\n```ocaml\nlet c = encode code \"abcde\";;\n```\n\nTo decode a string:\n```ocaml\ndecode code c;;\n```\n\n[techreport]: https://hal.archives-ouvertes.fr/hal-02149909\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocq-community%2Fhuffman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frocq-community%2Fhuffman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frocq-community%2Fhuffman/lists"}