{"id":13414715,"url":"https://github.com/dasch/ruby-bencode","last_synced_at":"2025-04-05T18:08:36.931Z","repository":{"id":415522,"uuid":"35062","full_name":"dasch/ruby-bencode","owner":"dasch","description":"Ruby bindings for the bencode data serialization format","archived":false,"fork":false,"pushed_at":"2024-08-12T08:40:20.000Z","size":547,"stargazers_count":79,"open_issues_count":1,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-29T16:10:02.435Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/dasch.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":"2008-07-17T22:56:50.000Z","updated_at":"2024-11-12T13:28:35.000Z","dependencies_parsed_at":"2024-12-02T01:18:51.913Z","dependency_job_id":null,"html_url":"https://github.com/dasch/ruby-bencode","commit_stats":{"total_commits":103,"total_committers":16,"mean_commits":6.4375,"dds":0.6116504854368932,"last_synced_commit":"0f00c44d7101ddd12e82014a939527fcf01bc5de"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fruby-bencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fruby-bencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fruby-bencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dasch%2Fruby-bencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dasch","download_url":"https://codeload.github.com/dasch/ruby-bencode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247378144,"owners_count":20929296,"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":[],"created_at":"2024-07-30T21:00:33.634Z","updated_at":"2025-04-05T18:08:36.908Z","avatar_url":"https://github.com/dasch.png","language":"Ruby","readme":"Ruby bencode binding\n====================\n\nThis is a simple library for reading and writing bencoded data.\n\n\nWhat is bencode?\n----------------\n\nBencode is a simple data serialization format used by the popular \n[BitTorrent](http://bittorrent.org/) P2P file sharing system.\n\nIt contains only four data types, namely:\n\n- byte strings\n- integers\n- lists\n- dictionaries\n\n\nExamples\n--------\n\nEncoding objects is as simple as calling `#bencode` on them:\n\n```ruby\n\"foo bar\".bencode                   # =\u003e \"7:foo bar\"\n42.bencode                          # =\u003e \"i42e\"\n[1, 2, 3].bencode                   # =\u003e \"li1ei2ei3ee\"\n{\"foo\" =\u003e 1, \"bar\" =\u003e -10}.bencode  # =\u003e \"d3:bari-10e3:fooi1ee\"\n```\n\nDecoding a complete data stream is as easy as calling `BEncode.load(data)`.\n\nDecoding a data stream in chunks works as follows:\n\n```ruby\nirb(main):007:0\u003e stream = BEncode::Parser.new(StringIO.new \"d3:foo3:bared3:baz3:quxe\")\n=\u003e #\u003cBEncode::Parser:0x007fbe6b008c88 @stream=#\u003cStringIO:0x007fbe6b008cd8\u003e\u003e\nirb(main):008:0\u003e stream.parse!\n=\u003e {\"foo\"=\u003e\"bar\"}\nirb(main):009:0\u003e stream.parse!\n=\u003e {\"baz\"=\u003e\"qux\"}\n```\n\nLicense\n-------\n\nReleased under the MIT license.\n\n\nContributors\n------------\n\n- Daniel Schierbeck ([dasch](https://github.com/dasch))\n- Mike Hodgson ([mikehodgson](https://github.com/mikehodgson))\n- Andrew Danforth\n- Eric Himmelreich\n- Allen Madsen ([blatyo](https://github.com/blatyo))\n- Ian Levesque ([ianlevesque](https://github.com/ianlevesque))\n- Dirk Geurs ([Dirklectisch](https://github.com/Dirklectisch))\n- Xinyue Lu ([msg7086](https://github.com/msg7086))\n","funding_links":[],"categories":["Protocols"],"sub_categories":["BitTorrent"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fruby-bencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdasch%2Fruby-bencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdasch%2Fruby-bencode/lists"}