{"id":15056341,"url":"https://github.com/hyperimpose/bencode","last_synced_at":"2026-01-02T11:30:08.107Z","repository":{"id":233285939,"uuid":"786412376","full_name":"hyperimpose/bencode","owner":"hyperimpose","description":"An erlang implementation of Bittorrent’s bencode format. See: http://bittorrent.org/beps/bep_0003.html","archived":false,"fork":false,"pushed_at":"2024-04-16T22:41:41.000Z","size":10,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-21T00:50:14.713Z","etag":null,"topics":["bencode","bencode-decoder","bencode-encoder","bencode-parser","erlang","erlang-libraries","erlang-library","erlang-otp"],"latest_commit_sha":null,"homepage":"","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hyperimpose.png","metadata":{"files":{"readme":"README.org","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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-04-14T11:40:42.000Z","updated_at":"2024-04-14T14:18:18.000Z","dependencies_parsed_at":"2024-04-16T23:36:25.262Z","dependency_job_id":"ff2ec543-6846-42ca-adf8-ecd9eaf60e5a","html_url":"https://github.com/hyperimpose/bencode","commit_stats":null,"previous_names":["hyperimpose/bencode"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperimpose%2Fbencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperimpose%2Fbencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperimpose%2Fbencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hyperimpose%2Fbencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hyperimpose","download_url":"https://codeload.github.com/hyperimpose/bencode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243532562,"owners_count":20306156,"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","bencode-decoder","bencode-encoder","bencode-parser","erlang","erlang-libraries","erlang-library","erlang-otp"],"created_at":"2024-09-24T21:50:01.365Z","updated_at":"2026-01-02T11:30:08.046Z","avatar_url":"https://github.com/hyperimpose.png","language":"Erlang","readme":"* bencode\n\nAn erlang implementation of Bittorrent's bencode format. See: http://bittorrent.org/beps/bep_0003.html\n  \n** Notes and Warnings\n\n- There is no depth limit.\n- No error handing. Invalid input will cause a crash.\n\n\n** Build\n\nThis library can be built with rebar3: ~$ rebar3 compile~\n\nor you can include it in your projects as a dependency in rebar.config:\n#+BEGIN_SRC erlang\n  {deps, [%% ... Other dependencies\n         {bencode, {git, \"https://github.com/hyperimpose/bencode.git\", {branch, \"master\"}}}]}.\n#+END_SRC\n\n** API Usage\n\nThere are two functions exported by ~bencode~: decode/1 and encode/1.\n\n#+BEGIN_SRC erlang\n  %% Encode an erlang term:\n  %%\n  %% This function will return the following bencoded binary:\n  %% \u003c\u003c\"d4:testi123ee\"\u003e\u003e\n  bencode:encode(#{\u003c\u003c\"test\" =\u003e 123\u003e\u003e}).\n\n  %% Decode an erlang term:\n  %%\n  %% This function will return an erlang dictionary:\n  %% #{\u003c\u003c\"test\" =\u003e 123\u003e\u003e}\n  bencode:decode(\u003c\u003c\"d4:testi123ee\"\u003e\u003e).\n\n  %% See the next section for the supported terms and their equivalents.\n#+END_SRC\n\n** Term Mapping\n\nThe bencoded values map to Erlang terms as follows:\n\n|--------------+--------------------------------------------------------------|\n| Bencode      | Erlang                                                       |\n|--------------+--------------------------------------------------------------|\n| dictionaries | map() #{} (If there are duplicate keys the last one is kept) |\n| lists        | list() [] (Including strings/iolists etc.)                   |\n| integers     | integer()                                                    |\n| strings      | binary()                                                     |\n|--------------+--------------------------------------------------------------|\n\nAtoms or other terms are not supported.\n\n** License\n\nThis implementation of bencode is licensed under the [[https://spdx.org/licenses/BSD-3-Clause.html][BSD 3-Clause \"New\" or \"Revised\" License]].\nA copy of this license is included in the file [[./COPYING][COPYING]].\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperimpose%2Fbencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhyperimpose%2Fbencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhyperimpose%2Fbencode/lists"}