{"id":42304960,"url":"https://github.com/beito123/nbt","last_synced_at":"2026-01-27T11:05:32.828Z","repository":{"id":57513960,"uuid":"173217592","full_name":"beito123/nbt","owner":"beito123","description":"This is a simple NBT parser written in Go. ","archived":false,"fork":false,"pushed_at":"2020-04-21T13:39:40.000Z","size":27,"stargazers_count":6,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T05:03:50.114Z","etag":null,"topics":["go","golang","golang-library","mcbe","nbt","nbt-parser"],"latest_commit_sha":null,"homepage":"","language":"Go","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/beito123.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}},"created_at":"2019-03-01T01:58:48.000Z","updated_at":"2024-04-15T14:19:58.000Z","dependencies_parsed_at":"2022-08-29T22:40:57.102Z","dependency_job_id":null,"html_url":"https://github.com/beito123/nbt","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/beito123/nbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beito123%2Fnbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beito123%2Fnbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beito123%2Fnbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beito123%2Fnbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beito123","download_url":"https://codeload.github.com/beito123/nbt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beito123%2Fnbt/sbom","scorecard":{"id":230657,"data":{"date":"2025-08-11","repo":{"name":"github.com/beito123/nbt","commit":"67c01ee733fff04cfa8d3c5bae56d8fa5f68f4f2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Code-Review","score":0,"reason":"Found 0/17 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":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"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":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"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":"Dangerous-Workflow","score":-1,"reason":"no workflows found","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":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"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":"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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: 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":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"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"}}]},"last_synced_at":"2025-08-17T04:47:23.009Z","repository_id":57513960,"created_at":"2025-08-17T04:47:23.009Z","updated_at":"2025-08-17T04:47:23.009Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28812367,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T07:41:26.337Z","status":"ssl_error","status_checked_at":"2026-01-27T07:41:08.776Z","response_time":168,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["go","golang","golang-library","mcbe","nbt","nbt-parser"],"created_at":"2026-01-27T11:05:32.321Z","updated_at":"2026-01-27T11:05:32.823Z","avatar_url":"https://github.com/beito123.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NBT\n\nMaybe This is a simple NBT parser.\n\n## Gets\n\nYou can get the package with go get command.\n\n```shell\ngo get -u github.com/beito123/nbt\n```\n\n*-u is a option updating the package*\n\n## License\n\nThis is licensed by MIT License.\nSee LICENSE file.\n\n## Examples\n\n### Read\n\n```go\nfunc main() {\n\t// Data: Unnamed(compound){ world_name(string): jagajaga, hardcore(byte): 18 }\n\n\t// Raw data\n\t// \t0x0000: 0a 00 00 01 00 08 68 61 72 64 63 6f | ......hardco\n\t// \t0x000c: 72 65 12 08 00 0a 77 6f 72 6c 64 5f | re....world_\n\t// \t0x0018: 6e 61 6d 65 00 08 6a 61 67 61 6a 61 | name..jagaja\n\t// \t0x0024: 67 61 00                            | ga.\n\n\t// Compressed bytes // level.dat and more are saved as compressed with gzip\n\tdata := []byte{0x1F, 0x8B, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\n\t\t0x03, 0xE3, 0x62, 0x60, 0x60, 0x64, 0xE0, 0xC8, 0x48, 0x2C, 0x4A,\n\t\t0x49, 0xCE, 0x2F, 0x4A, 0x15, 0xE2, 0x60, 0xE0, 0x2A, 0xCF, 0x2F,\n\t\t0xCA, 0x49, 0x89, 0xCF, 0x4B, 0xCC, 0x4D, 0x65, 0xE0, 0xC8, 0x4A,\n\t\t0x4C, 0x4F, 0x04, 0x61, 0x06, 0x00, 0x7A, 0x8D, 0xB4, 0xF9, 0x27, 0x00, 0x00, 0x00}\n\n\t// Read after uncompressing\n\t// If you want to parse compressed bytes, you should use this\n\tstream, err := nbt.FromReader(bytes.NewBuffer(data), nbt.BigEndian)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// If you read from file\n\t// stream, err := nbt.FromFile(\"./level.dat\", nbt.BigEndian)\n\n\t// Read a tag from read bytes\n\ttag, err := stream.ReadTag()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Convert to String // For dump\n\tstr, err := tag.ToString()\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// read data: { hardcore(Byte): 18, world_name(String): jagajaga }\n\tfmt.Printf(\"read data: %s\", str)\n}\n```\n\n### Write\n\n```go\nfunc main(){\n\t// tag = Unnamed(Compound){ hardcore(Byte): 18, world_name(String): jagajaga }\n\ttag := \u0026nbt.Compound{\n\t\tValue: map[string]nbt.Tag{\n\t\t\t\"hardcore\": \u0026nbt.Byte{\n\t\t\t\tValue: 18,\n\t\t\t},\n\t\t\t\"world_name\": \u0026nbt.String{\n\t\t\t\tValue: \"jagajaga\",\n\t\t\t},\n\t\t},\n\t}\n\n\t// New stream with big endian\n\t// Big endian is used for level.dat and world data\n\t// Little endian is used for leveldb\n\tstream := nbt.NewStream(nbt.BigEndian)\n\n\t// Write a tag\n\terr := stream.WriteTag(tag)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\t// Output file:\n\t// 0x0000: 0a 00 00 01 00 08 68 61 72 64 63 6f | ......hardco\n\t// 0x000c: 72 65 12 08 00 0a 77 6f 72 6c 64 5f | re....world_\n\t// 0x0018: 6e 61 6d 65 00 08 6a 61 67 61 6a 61 | name..jagaja\n\t// 0x0024: 67 61 00                            | ga.\n\tioutil.WriteFile(\"./nbt.dat\", stream.Bytes(), os.ModePerm)\n\n\tfmt.Println(\"generated ./nbt.dat\")\n\n\t// If you want to compress for level.dat etc...\n\tdata, err := nbt.Compress(stream, nbt.CompressGZip, nbt.DefaultCompressionLevel)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tioutil.WriteFile(\"./nbt_compressed.dat\", data, os.ModePerm)\n\n\tfmt.Println(\"generated ./nbt_compressed.dat\")\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeito123%2Fnbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeito123%2Fnbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeito123%2Fnbt/lists"}