{"id":37102018,"url":"https://github.com/frogstair/nbt","last_synced_at":"2026-01-14T12:22:19.080Z","repository":{"id":107180455,"uuid":"364320857","full_name":"frogstair/nbt","owner":"frogstair","description":"Library to parse and generate NBT data in Go","archived":false,"fork":false,"pushed_at":"2021-05-10T16:34:19.000Z","size":12,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-20T11:50:10.538Z","etag":null,"topics":["nbt","nbt-library","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/frogstair.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":"2021-05-04T16:34:35.000Z","updated_at":"2022-05-27T18:25:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"f3383df2-0df5-4ca0-8880-5fe813bbc1ae","html_url":"https://github.com/frogstair/nbt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/frogstair/nbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frogstair%2Fnbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frogstair%2Fnbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frogstair%2Fnbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frogstair%2Fnbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/frogstair","download_url":"https://codeload.github.com/frogstair/nbt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/frogstair%2Fnbt/sbom","scorecard":{"id":411978,"data":{"date":"2025-08-11","repo":{"name":"github.com/frogstair/nbt","commit":"c612f6440b24536a5e9a8cfb93cb10489c22a535"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"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":"Code-Review","score":0,"reason":"Found 0/14 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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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":"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"}},{"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"}}]},"last_synced_at":"2025-08-18T22:57:00.440Z","repository_id":107180455,"created_at":"2025-08-18T22:57:00.440Z","updated_at":"2025-08-18T22:57:00.440Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420637,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"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":["nbt","nbt-library","nbt-parser"],"created_at":"2026-01-14T12:22:18.251Z","updated_at":"2026-01-14T12:22:19.066Z","avatar_url":"https://github.com/frogstair.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NBT for Go\n\nThis is a simple NBT encoder/decoder that does not use any custom structs/types that supports compression\n\n## Supported types of data\n\nFor now it can only encode/decode tags whose root node is a **composite**, other types are coming in the near future. It can also only encode/decode maps, and support for structs and struct tags will also be added later\n\n## Features\n\n- Easy to represent data with map syntax\n- Compression with gzip\n- Fast\n- No external libraries\n- Very compact\n- A more compact wrapper to improve readability\n\n## Precautions\n\nIt is necessary to explicitly specify a type for each **numerical value** because of how NBT works. If not specified, the smallest fitting type would be used, except floating point numbers, where the default `float64` is used.\n\nSince nbt uses **signed** bytes, it is necessary to not use `byte` in the map, cast it to `int8` instead.\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"encoding/json\"\n    \"fmt\"\n    \"io/ioutil\"\n    \"os\"\n\n    \"github.com/frogstair/nbt\"\n)\n\nfunc main() {\n\n    // Sample data to work with\n    data := map[string]interface{}{\n        \"nested\": nbt.C{\n            \"egg\": nbt.C{\n                \"name\":  \"Eggbert\",\n                \"value\": 0.5,\n            },\n            \"ham\": nbt.C{\n                \"name\":  \"Hambert\",\n                \"value\": 0.75,\n            },\n        },\n        \"listTest (compound)\": []nbt.C{\n            {\n                \"createdOn\": int64(1264099775885),\n                \"name\":      \"nbt.Compound Tag #0\",\n            },\n            {\n                \"createdOn\": int64(1264099775885),\n                \"name\":      \"nbt.Compound Tag #1\",\n            },\n        },\n        \"empty\": []int64{},\n        // No need to specify type here, because go will force every number to be an int64\n        \"listTest (long)\": []int64{\n            11,\n            12,\n            13,\n            14,\n            15,\n        },\n        \"byteTest\":   int8(127),\n        \"shortTest\":  int16(32767),\n        \"intTest\":    int32(2147483647),\n        \"longTest\":   int64(9223372036854775807),\n        \"guessInt8\":  42,\n        \"guessInt16\": 4242,\n        \"guessInt32\": 424242,\n        \"guessInt64\": 42424242424242,\n        // Will be printed as base64 encoded because thats how JSON works\n        \"byteArr\": []int8{1, 2, 3, 4, 5},\n        // Support for unicode\n        \"stringTest\": \"HELLO WORLD THIS IS A TEST STRING! こんにちは世界〜\",\n    }\n\n    // Encode the data as bytes and compress it with gzip\n    b := nbt.EncodeCompress(data, \"\")\n    // Write data to a file\n    ioutil.WriteFile(\"./bigtest.nbt\", b, 0644)\n\n    // Open the file with the data\n    f, _ := os.Open(\"bigtest.nbt\")\n    // Make an empty container\n    m := make(map[string]interface{})\n\n    // Decode compressed file stream. Any reader that contains the NBT data works\n    err := nbt.DecodeCompressedStream(f, \u0026m)\n    if err != nil {\n        panic(err)\n    }\n\n    // Pretty print the map using JSON\n    t, _ := json.MarshalIndent(m, \"\", \"  \")\n    fmt.Print(string(t), \"\\n\")\n}\n\n\n```\n\nThis example can also be found in the `examples` folder\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrogstair%2Fnbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffrogstair%2Fnbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffrogstair%2Fnbt/lists"}