{"id":36854210,"url":"https://github.com/8ff/viterbi","last_synced_at":"2026-01-12T14:41:56.416Z","repository":{"id":64973591,"uuid":"580122460","full_name":"8ff/viterbi","owner":"8ff","description":"Convolutional encoder and a Viterbi decoder written in Golang","archived":false,"fork":false,"pushed_at":"2024-09-04T19:25:42.000Z","size":538,"stargazers_count":13,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-09-06T03:31:41.636Z","etag":null,"topics":["convolutional","golang","viterbi","viterbi-decoder"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/8ff.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":"2022-12-19T19:21:58.000Z","updated_at":"2024-09-04T19:25:46.000Z","dependencies_parsed_at":"2024-06-19T01:43:28.988Z","dependency_job_id":null,"html_url":"https://github.com/8ff/viterbi","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/8ff/viterbi","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8ff%2Fviterbi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8ff%2Fviterbi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8ff%2Fviterbi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8ff%2Fviterbi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/8ff","download_url":"https://codeload.github.com/8ff/viterbi/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/8ff%2Fviterbi/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28340403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["convolutional","golang","viterbi","viterbi-decoder"],"created_at":"2026-01-12T14:41:55.796Z","updated_at":"2026-01-12T14:41:56.408Z","avatar_url":"https://github.com/8ff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![logo](media/logo.svg)\n# Convolutional Encoder and Viterbi Decoder\n\nThis package implements a convolutional encoder and a Viterbi decoder.\nIt can be used as a library or as a command line tool.\n\n## Using as a library\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/8ff/viterbi\"\n)\n\nfunc main() {\n\t// Initialize a codec.\n\tcodec, err := viterbi.Init(viterbi.Input{Constraint: 7, Polynomials: []int{91, 109, 121}, ReversePolynomials: false})\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t/**** Encode Bytes ****/\n\tinput := []byte(\"Hello, world!\")\n\n\t// Encode a message.\n\tencoded := codec.EncodeBytes(input)\n\n\t// Decode the message.\n\tdecoded := codec.DecodeBytes(encoded)\n\n\t// Print input and decoded message.\n\tfmt.Printf(\"InputBytes:   %s\\n\", input)\n\tfmt.Printf(\"DecodedBytes: %s\\n\", decoded)\n\n\t/**** Encode string of bits ****/\n\tinputBits := \"101010\"\n\n\t// Encode a message.\n\tencodedBits := codec.Encode(inputBits)\n\n\t// Decode the message.\n\tdecodedBits := codec.Decode(encodedBits)\n\n\t// Print input and decoded message.\n\tfmt.Printf(\"InputBits:   %s\\n\", inputBits)\n\tfmt.Printf(\"DecodedBits: %s\\n\", decodedBits)\n}\n\n```\n\n## Using as command line tool\n```bash\ncd cmd/viterbiCli\n\n# Encode\necho 101010 | go run viterbiCli.go encode 3 5 7\n\n# Decode\necho 10000010 | go run viterbiCli.go decode 3 5 7\n\n# Encode/Decode\necho 101010 | go run viterbiCli.go encode 3 5 7 | go run viterbiCli.go decode 3 5 7\n```\n\n## Error Handling\nInputs are validated, and proper error messages will be displayed.\n\n* The constraint should be greater than 0.\n* A generator polynomial should be greater than 0 and less than 1 \u003c\u003c constraint.\n* The received bit sequence should be of length N * \u003cnum-of-polynomials\u003e where N is an integer. Otherwise some bits must be missing during transmission. We will fill in appropriate number of trailing zeros.\n\n## Dependencies\nThis code contains no external dependencies.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8ff%2Fviterbi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F8ff%2Fviterbi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F8ff%2Fviterbi/lists"}