ws-voxel: codecs/text/Nbt (NBT Java / Bedrock / network varint, SNBT parse + print, typed values), data/nbt, data/snbt

Shared change: codecs/compress/Deflate gains Deflate.peek(buf, off, len, n) (the first n inflated bytes of a
gzip / zlib / raw stream, for sniffing gzip-wrapped NBT) through a backward-compatible prefix flag on
Inflate.raw; gunzip's header parsing moved into a local helper both use.
This commit is contained in:
4DBug committed 2026-10-31 14:12:46 -05:00
1 parent de4f14a343
commit 998177e5ab
15 files changed
+2745 -26

No files matched your search

+24
View File
@@ -698,6 +698,18 @@ local list: { Entry } = {
return require("@formats/data/msgpack")
end,
},
{
name = "nbt",
category = "data",
path = "data/nbt",
extensions = { "nbt", "dat", "mcstructure", "dat_old" },
mime = { "application/x-minecraft-nbt" },
deps = { "core/Err", "core/Bytes", "codecs/text/Nbt" },
caps = { decode = true, encode = true, binary = true, ordered = true, typed = true },
load = function()
return require("@formats/data/nbt")
end,
},
{
name = "plist",
category = "data",
@@ -710,6 +722,18 @@ local list: { Entry } = {
return require("@formats/data/plist")
end,
},
{
name = "snbt",
category = "data",
path = "data/snbt",
extensions = { "snbt" },
mime = { "text/x-minecraft-snbt" },
deps = { "core/Err", "core/Bytes", "core/Sniff", "codecs/text/Nbt" },
caps = { decode = true, encode = true, ordered = true, typed = true },
load = function()
return require("@formats/data/snbt")
end,
},
{
name = "toml",
category = "data",