{"id":23642425,"url":"https://github.com/sogaiu/janet-bencode","last_synced_at":"2026-01-24T13:38:56.390Z","repository":{"id":264309828,"uuid":"893005823","full_name":"sogaiu/janet-bencode","owner":"sogaiu","description":"Another bencode library for Janet","archived":false,"fork":false,"pushed_at":"2025-04-27T14:29:57.000Z","size":34,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-19T14:04:43.155Z","etag":null,"topics":["bencode","janet"],"latest_commit_sha":null,"homepage":"","language":"Janet","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/sogaiu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null}},"created_at":"2024-11-23T09:30:03.000Z","updated_at":"2025-04-27T14:30:01.000Z","dependencies_parsed_at":"2025-04-27T15:34:25.913Z","dependency_job_id":null,"html_url":"https://github.com/sogaiu/janet-bencode","commit_stats":null,"previous_names":["sogaiu/janet-bencode"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sogaiu/janet-bencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-bencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-bencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-bencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-bencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sogaiu","download_url":"https://codeload.github.com/sogaiu/janet-bencode/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sogaiu%2Fjanet-bencode/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28729044,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-24T10:24:43.181Z","status":"ssl_error","status_checked_at":"2026-01-24T10:24:36.112Z","response_time":89,"last_error":"SSL_read: 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":["bencode","janet"],"created_at":"2024-12-28T10:50:54.210Z","updated_at":"2026-01-24T13:38:56.350Z","avatar_url":"https://github.com/sogaiu.png","language":"Janet","readme":"# janet-bencode\n\nA janet bencode library based on [cmiles74's bencode\nlibrary](https://github.com/cmiles74/bencode).\n\n## Why\n\nWhen looking for a bencode library for use with Janet, cmiles74's\nbencode library seemed close to what I was looking for but there were\na variety of things which I wanted to do differently in terms of\nnaming, constructs used, reduction of features, testing, etc.\n\nI started by adding more tests to the functions in the original\nbencode library and followed some of [fogus'\nadvice](https://blog.fogus.me/2018/11/27/starboy/) to help develop my\nunderstanding.  `janet-bencode` is the result of these efforts.\n\n## Usage\n\nSee the files in the [usages directory](usages).  ATM, the functions\nmeant as a public interface include:\n\n* reading\n  * `reader`\n  * `stream-reader`\n  * `read`\n  * `read-buffer`\n  * `read-stream`\n\n* writing\n  * `write`\n  * `write-buffer`\n  * `write-stream`\n\nThese are very similar to the originals but some of the features have\nbeen removed (e.g. ignoring newlines) and names are not all the same.\n\n## Generated Docs\n\nThe\n[documentarian](https://github.com/pyrmont/documentarian)-generated\n[api.md file](api.md) exists for convenience of reference.  Although\nthere is documentation for all functions, not all of them are meant to\nbe publically used.  See the Usage section above for those bits.\n\nFor each function listed on api.md, following the corresponding source\nlink should land one at the first line of the source code for the\nfunction's definition.  Usually, there should be some example usages\nfor the function below its definition.\n\nFor example, the following sort of thing can be found for `read`:\n\n```janet\n(comment\n\n  (read (reader (string \"d\"\n                        \"2:\" \"id\"\n                        \"1:\" \"1\"\n                        \"2:\" \"op\"\n                        \"5:\" \"clone\"\n                        \"e\")))\n  # =\u003e\n  {:id \"1\" :op \"clone\"}\n\n  (read (reader \"\"))\n  # =\u003e\n  nil\n\n  (read (reader (string \"d2:id1:12:op5:clonee\"))\n        true)\n  # =\u003e\n  @{:id \"1\" :op \"clone\"}\n\n  )\n```\n\n## Credits\n\n* cmiles74 - bencode\n* greenfork - bencode contributions\n* felixr - bencode contributions\n* pyrmont - discussion, documentarian, and\n  [bencodobi](https://github.com/pyrmont/bencodobi)\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-bencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsogaiu%2Fjanet-bencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsogaiu%2Fjanet-bencode/lists"}