{"id":22289936,"url":"https://github.com/mersinvald/reed-solomon","last_synced_at":"2025-07-28T23:30:49.334Z","repository":{"id":3211206,"uuid":"48755523","full_name":"mersinvald/Reed-Solomon","owner":"mersinvald","description":"Reed Solomon BCH encoder and decoder","archived":false,"fork":false,"pushed_at":"2023-12-15T22:21:56.000Z","size":103,"stargazers_count":141,"open_issues_count":2,"forks_count":39,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-07-27T04:09:10.128Z","etag":null,"topics":["bch","cpp","decoder","embedded","encoder","encryption","reed-solomon"],"latest_commit_sha":null,"homepage":null,"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/mersinvald.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}},"created_at":"2015-12-29T16:07:49.000Z","updated_at":"2025-07-26T06:44:49.000Z","dependencies_parsed_at":"2022-08-30T22:30:11.680Z","dependency_job_id":null,"html_url":"https://github.com/mersinvald/Reed-Solomon","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mersinvald/Reed-Solomon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mersinvald%2FReed-Solomon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mersinvald%2FReed-Solomon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mersinvald%2FReed-Solomon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mersinvald%2FReed-Solomon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mersinvald","download_url":"https://codeload.github.com/mersinvald/Reed-Solomon/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mersinvald%2FReed-Solomon/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267604184,"owners_count":24114503,"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-07-28T02:00:09.689Z","response_time":68,"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":["bch","cpp","decoder","embedded","encoder","encryption","reed-solomon"],"created_at":"2024-12-03T17:10:48.976Z","updated_at":"2025-07-28T23:30:49.065Z","avatar_url":"https://github.com/mersinvald.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Reed-Solomon\nReed Solomon BCH encoder and decoder library\n\n## Overview\n\nThis RS implementation was designed for embedded purposes, so all the memory allocations performed on the stack.\u003cbr\u003e\nIf somebody wants to reimplement memory management with heap usage, pull requests are welcome\n\n## Getting the source\n\nIf you want only Reed-Solomon code, just clone repository.\u003cbr\u003e\nIf you want to get tests and examples also, do \n```\ngit clone --recursive git@github.com:mersinvald/Reed-Solomon.git\n```\n\n## Build\n\nThere is no need in building RS library, cause all the implementation is in headers.\u003cbr\u003e\nTo build tests and examples simply run \u003cb\u003emake\u003c/b\u003e in the folder with cloned repo and executables will emerge in the \n./build folder\n\n## Usage\n\nAll the Reed-Solomon code is in folder **include**, you just need to include header \u003cb\u003ers.hpp\u003c/b\u003e\n\nTemplate class ReedSolomon accepts two template arguments: message length and ecc length. \u003cbr\u003e\nSimple example: \u003cbr\u003e\n```\n    char message[] = \"Some very important message ought to be delivered\";\n    const int msglen = sizeof(message);\n    const int ecclen = 8;\n    \n    char repaired[msglen];\n    char encoded[msglen + ecclen];\n\n\n    RS::ReedSolomon\u003cmsglen, ecclen\u003e rs;\n\n    rs.Encode(message, encoded);\n\n    // Corrupting first 8 bytes of message (any 4 bytes can be repaired, no more)\n    for(uint i = 0; i \u003c ecclen / 2; i++) {\n        encoded[i] = 'E';\n    }\n\n    rs.Decode(encoded, repaired);\n\n    std::cout \u003c\u003c \"Original:  \" \u003c\u003c message  \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Corrupted: \" \u003c\u003c encoded  \u003c\u003c std::endl;\n    std::cout \u003c\u003c \"Repaired:  \" \u003c\u003c repaired \u003c\u003c std::endl;\n\n    std::cout \u003c\u003c ((memcmp(message, repaired, msglen) == 0) ? \"SUCCESS\" : \"FAILURE\") \u003c\u003c std::endl;\n```\n\n## Regards\n\nHuge thanks to authors of [wikiversity page about Reed-Solomon BCH](https://en.wikiversity.org/wiki/Reed–Solomon_codes_for_coders)\n## Related projects\n\n[Arduino Reed-Solomon Forward Error Correction library](https://github.com/simonyipeter/Arduino-FEC)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmersinvald%2Freed-solomon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmersinvald%2Freed-solomon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmersinvald%2Freed-solomon/lists"}