{"id":14966095,"url":"https://github.com/interlab/p6-bencoder","last_synced_at":"2026-02-05T10:31:24.403Z","repository":{"id":74829499,"uuid":"208592203","full_name":"interlab/p6-Bencoder","owner":"interlab","description":"Encode and Decode Bencoding data","archived":false,"fork":false,"pushed_at":"2019-09-15T13:22:19.000Z","size":170,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-09T15:52:56.168Z","etag":null,"topics":["bencode","perl6","raku"],"latest_commit_sha":null,"homepage":"","language":"Perl 6","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"artistic-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/interlab.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":"2019-09-15T12:39:43.000Z","updated_at":"2022-11-17T16:13:51.000Z","dependencies_parsed_at":null,"dependency_job_id":"1a3517f3-a5c0-43be-8c31-0beff5614f87","html_url":"https://github.com/interlab/p6-Bencoder","commit_stats":{"total_commits":29,"total_committers":2,"mean_commits":14.5,"dds":0.3793103448275862,"last_synced_commit":"13ef64c1c4a55196800e056763dfd0b0d17418e2"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/interlab/p6-Bencoder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fp6-Bencoder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fp6-Bencoder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fp6-Bencoder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fp6-Bencoder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/interlab","download_url":"https://codeload.github.com/interlab/p6-Bencoder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/interlab%2Fp6-Bencoder/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263943488,"owners_count":23533597,"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","perl6","raku"],"created_at":"2024-09-24T13:35:49.147Z","updated_at":"2026-02-05T10:31:24.369Z","avatar_url":"https://github.com/interlab.png","language":"Perl 6","readme":"# Bencoder\nEncode and decode bencoding data (torrent files) lib for Perl 6\n\n## Install\n`zef -v install https://github.com/interlab/p6-Bencoder.git`\n\n## Examples\n### Encode data\n```perl6\nuse Bencoder;\nmy $bdata = bencode({bar =\u003e 'spam', foo =\u003e 42}, True);\nsay $bdata; # d3:bar4:spam3:fooi42ee\n```\n\n### Encode torrent file\n```perl6\nuse Bencoder;\nmy $path = 'F:\\examples\\ubuntu-19.04-desktop-amd64.iso.torrent';\nmy $new-path = 'F:\\examples\\ubuntu-19.04-copy.torrent';\nmy %data = bdecode-file $path;\nsay %data\u003cannounce\u003e.decode; # http://torrent.ubuntu.com:6969/announce\nbencode-file($new-path, %data); # Dump file to new path\n```\n\n### Decode data\n```perl6\nuse Bencoder;\nmy $data = bdecode('13:Hello, World!', True);\nsay $data; # Hello, World!\n```\n\n### Decode torrent file\n```perl6\nuse Bencoder;\nmy $path = 'F:\\examples\\ubuntu-19.04-desktop-amd64.iso.torrent'; # Change your path\nmy %data = bdecode-file $path;\nsay %data\u003cannounce\u003e.decode; # http://torrent.ubuntu.com:6969/announce\n```\n\n### Get info-hash of torrent file\n```perl6\nuse Bencoder::TorrentInfo;\nmy $tor-info = Bencoder::TorrentInfo.new(path =\u003e 'ubuntu-19.04-desktop-amd64.iso.torrent'); # Change your path\nsay $tor-info.info-hash; # D540FC48EB12F2833163EED6421D449DD8F1CE1F\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlab%2Fp6-bencoder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finterlab%2Fp6-bencoder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finterlab%2Fp6-bencoder/lists"}