{"id":42203819,"url":"https://github.com/dampcake/bencode","last_synced_at":"2026-01-27T00:30:31.310Z","repository":{"id":16522984,"uuid":"41388350","full_name":"dampcake/bencode","owner":"dampcake","description":"Bencode Input/Output Streams for Java","archived":false,"fork":false,"pushed_at":"2025-05-08T21:16:02.000Z","size":341,"stargazers_count":65,"open_issues_count":0,"forks_count":16,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-08T21:24:00.656Z","etag":null,"topics":["bencode","bencode-parser","bencoder","java"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dampcake.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,"zenodo":null}},"created_at":"2015-08-25T21:16:46.000Z","updated_at":"2025-05-08T21:16:06.000Z","dependencies_parsed_at":"2025-03-27T06:23:23.512Z","dependency_job_id":"912a8705-8b70-4ba0-81a2-aad79a7dee4d","html_url":"https://github.com/dampcake/bencode","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/dampcake/bencode","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dampcake%2Fbencode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dampcake%2Fbencode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dampcake%2Fbencode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dampcake%2Fbencode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dampcake","download_url":"https://codeload.github.com/dampcake/bencode/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dampcake%2Fbencode/sbom","scorecard":{"id":318258,"data":{"date":"2025-08-11","repo":{"name":"github.com/dampcake/bencode","commit":"feb64422c3ff457e686f882bbbd42a7035db175b"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:38: update your workflow using https://app.stepsecurity.io/secureworkflow/dampcake/bencode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/dampcake/bencode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/dampcake/bencode/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/dampcake/bencode/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:27: update your workflow using https://app.stepsecurity.io/secureworkflow/dampcake/bencode/ci.yml/main?enable=pin","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/ci.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: Apache License 2.0: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact bencode-1.4.2 not signed: https://api.github.com/repos/dampcake/bencode/releases/217439845","Warn: release artifact bencode-1.4.1 not signed: https://api.github.com/repos/dampcake/bencode/releases/111506678","Warn: release artifact bencode-1.4 not signed: https://api.github.com/repos/dampcake/bencode/releases/68899196","Warn: release artifact bencode-1.3.2 not signed: https://api.github.com/repos/dampcake/bencode/releases/49036801","Warn: release artifact bencode-1.3.1 not signed: https://api.github.com/repos/dampcake/bencode/releases/25383657","Warn: release artifact bencode-1.4.2 does not have provenance: https://api.github.com/repos/dampcake/bencode/releases/217439845","Warn: release artifact bencode-1.4.1 does not have provenance: https://api.github.com/repos/dampcake/bencode/releases/111506678","Warn: release artifact bencode-1.4 does not have provenance: https://api.github.com/repos/dampcake/bencode/releases/68899196","Warn: release artifact bencode-1.3.2 does not have provenance: https://api.github.com/repos/dampcake/bencode/releases/49036801","Warn: release artifact bencode-1.3.1 does not have provenance: https://api.github.com/repos/dampcake/bencode/releases/25383657"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Packaging","score":10,"reason":"packaging workflow detected","details":["Info: Project packages its releases by way of GitHub Actions.: .github/workflows/ci.yml:32"],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 16 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-18T00:46:09.197Z","repository_id":16522984,"created_at":"2025-08-18T00:46:09.197Z","updated_at":"2025-08-18T00:46:09.197Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28793281,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"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","bencode-parser","bencoder","java"],"created_at":"2026-01-27T00:30:30.652Z","updated_at":"2026-01-27T00:30:31.296Z","avatar_url":"https://github.com/dampcake.png","language":"Java","readme":"# bencode\n\n[![Build Status](https://github.com/dampcake/bencode/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/dampcake/bencode/actions?query=branch%3Amain)\n[![Coverage Status](https://codecov.io/gh/dampcake/bencode/branch/main/graph/badge.svg)](https://codecov.io/gh/dampcake/bencode)\n[![Maven](https://img.shields.io/maven-central/v/com.dampcake/bencode.svg)](http://search.maven.org/#search%7Cga%7C1%7Ccom.dampcake.bencode)\n[![GitHub license](https://img.shields.io/github/license/dampcake/bencode.svg)](https://github.com/dampcake/bencode/blob/main/LICENSE)\n\nBencode Input/Output Streams for Java\n\nRequires JDK 1.8 or higher\n\n[Bencode Spec](https://wiki.theory.org/BitTorrentSpecification#Bencoding)\n\n[Bencode Wikipedia](https://en.wikipedia.org/wiki/Bencode)\n\n## Javadoc\nhttp://dampcake.github.io/bencode\n\n## Usage\n\n### Maven\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.dampcake\u003c/groupId\u003e\n    \u003cartifactId\u003ebencode\u003c/artifactId\u003e\n    \u003cversion\u003e1.4.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n```groovy\ncompile 'com.dampcake:bencode:1.4.2'\n```\n\n### Examples\n\n#### Bencode Data\n```java\nBencode bencode = new Bencode();\nbyte[] encoded = bencode.encode(new HashMap\u003cObject, Object\u003e() {{\n    put(\"string\", \"value\");\n    put(\"number\", 123456);\n    put(\"list\", new ArrayList\u003cObject\u003e() {{\n        add(\"list-item-1\");\n        add(\"list-item-2\");\n    }});\n    put(\"dict\", new ConcurrentSkipListMap() {{\n        put(123, \"test\");\n        put(456, \"thing\");\n    }});\n}});\n\nSystem.out.println(new String(encoded, bencode.getCharset()));\n```\n\nOutputs: ```d4:dictd3:1234:test3:4565:thinge4:listl11:list-item-111:list-item-2e6:numberi123456e6:string5:valuee```\n\n#### Decode Bencoded Data:\n```java\nBencode bencode = new Bencode();\nMap\u003cString, Object\u003e dict = bencode.decode(\"d4:dictd3:1234:test3:4565:thinge4:listl11:list-item-111:list-item-2e6:numberi123456e6:string5:valuee\".getBytes(), Type.DICTIONARY);\n\nSystem.out.println(dict);\n```\n\nOutputs: ```{dict={123=test, 456=thing}, list=[list-item-1, list-item-2], number=123456, string=value}```\n\n#### Write bencoded data to a Stream:\n```java\nByteArrayOutputStream out = new ByteArrayOutputStream();\nBencodeOutputStream bencoder = new BencodeOutputStream(out);\n\nbencoder.writeDictionary(new HashMap\u003cObject, Object\u003e() {{\n    put(\"string\", \"value\");\n    put(\"number\", 123456);\n    put(\"list\", new ArrayList\u003cObject\u003e() {{\n        add(\"list-item-1\");\n        add(\"list-item-2\");\n    }});\n    put(\"dict\", new ConcurrentSkipListMap() {{\n        put(\"dict-item-1\", \"test\");\n        put(\"dict-item-2\", \"thing\");\n    }});\n}});\n\nSystem.out.println(new String(out.toByteArray()));\n```\n\nOutputs: ```d4:dictd11:dict-item-14:test11:dict-item-25:thinge4:listl11:list-item-111:list-item-2e6:numberi123456e6:string5:valuee```\n\n#### Read bencoded data to a Stream:\n```java\nString input = \"d4:dictd11:dict-item-14:test11:dict-item-25:thinge4:listl11:list-item-111:list-item-2e6:numberi123456e6:string5:valuee\";\nByteArrayInputStream in = new ByteArrayInputStream(input.getBytes());\nBencodeInputStream bencode = new BencodeInputStream(in);\n\nType type = bencode.nextType(); // Returns Type.DICTIONARY\nMap\u003cString, Object\u003e dict = bencode.readDictionary();\n\nSystem.out.println(dict);\n```\n\nOutputs: ```{dict={dict-item-1=test, dict-item-2=thing}, list=[list-item-1, list-item-2], number=123456, string=value}```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdampcake%2Fbencode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdampcake%2Fbencode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdampcake%2Fbencode/lists"}