{"id":21395246,"url":"https://github.com/dxtym/beancode","last_synced_at":"2025-03-16T14:25:59.023Z","repository":{"id":247652276,"uuid":"821502701","full_name":"dxtym/beancode","owner":"dxtym","description":"bencode parser","archived":false,"fork":false,"pushed_at":"2024-11-26T05:28:27.000Z","size":35,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-23T01:44:18.137Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/dxtym.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":"2024-06-28T17:29:39.000Z","updated_at":"2024-12-03T17:09:58.000Z","dependencies_parsed_at":"2024-07-27T15:57:33.209Z","dependency_job_id":null,"html_url":"https://github.com/dxtym/beancode","commit_stats":null,"previous_names":["dxtym/beancode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxtym%2Fbeancode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxtym%2Fbeancode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxtym%2Fbeancode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dxtym%2Fbeancode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dxtym","download_url":"https://codeload.github.com/dxtym/beancode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243880604,"owners_count":20362800,"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":["bencode","go","parser"],"created_at":"2024-11-22T14:18:46.466Z","updated_at":"2025-03-16T14:25:58.992Z","avatar_url":"https://github.com/dxtym.png","language":"Go","readme":"## Beancode\n\nWorking with BitTorrent? You need Beancode.\n\n## Features\n\n* Easy API based on stdlib\n* Almost full unit test coverage: 86%\n* Support int, string, slice, map, and struct\n\n## Usage\n\nLet's define a common struct for encoding and decoding processes:\n```go\ntype Boo struct {\n\tFoo int `beancode:\"foo\"`\n\tBar string `Beancode:\"bar\"`\n}\n```\n\nTo marshal into Bencode:\n```go\nfrom := Boo{Foo: 42, Bar: \"qux\"}\nval, err := beancode.Marshal(from)\n```\n\nTo unmarshal from Bencode:\n```go\nvar to Boo\nfrom := \"d3:fooi42e3:bar3:quxe\"\n\nerr := beancode.Unmarshal(from, \u0026to)\n```\n\nVoila, as simple as that!\n\n## Install\n\n```go\ngo get github.com/dxtym/beancode\n```\n\n## Benchmarks\n\nCovered on AMD Ryzen 3 4300U with Radeon Graphics (8GB RAM).\n\n* Marshal: 3652 ns/op, 361 B/op, 17 allocs/op\n* Unmarshal: 3672 ns/op, 1515 B/op, 22 allocs/op\n\n## Plans\n\n* Implement decode to struct\n* Enhance benchmark performance\n* Have some documentation\n\n## License\n\n[MIT License](LICENSE)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxtym%2Fbeancode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdxtym%2Fbeancode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdxtym%2Fbeancode/lists"}