data formats: comments are specs only
This commit is contained in:
1 parent
0bd7b87d2b
commit
0452f26eef
18 files changed
+110
-224
No files matched your search
@@ -1,10 +1,7 @@
|
||||
--!strict
|
||||
-- data/nbt: Minecraft NBT files (.nbt structures, level.dat / playerdata .dat, servers.dat, Bedrock .mcstructure and
|
||||
-- level.dat), a thin format over codecs/text/Nbt (which see for the value mapping). Supports: Java big-endian and
|
||||
-- Bedrock little-endian NBT (the level.dat 8-byte header too; network varint NBT with opts.varint), gzip / zlib /
|
||||
-- uncompressed, every tag type, exact round trips (Nbt.info(value) remembers the root name, edition, compression
|
||||
-- and header; encode writes it back the same way unless opts say otherwise). Text SNBT: data/snbt.
|
||||
-- Not supported: nothing in the format.
|
||||
-- data/nbt: Minecraft NBT files over codecs/text/Nbt. Supports: Java big-endian and Bedrock little-endian NBT
|
||||
-- (level.dat header, varint by option), gzip / zlib / raw, every tag, exact round trips (Nbt.info).
|
||||
-- Not supported: none.
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ requires
|
||||
local Err = require("@rosetta/core/Err")
|
||||
@@ -54,7 +51,7 @@ function NbtFormat.encode(value: any, opts: EncodeOptions?): (buffer?, Err.Err?)
|
||||
end
|
||||
|
||||
-- ------------------------------------------------------------------------------------------------ extras
|
||||
NbtFormat.info = Nbt.info -- how a decoded value was stored: { name, endian, compression, header?, varint? }
|
||||
NbtFormat.info = Nbt.info
|
||||
NbtFormat.Nbt = Nbt
|
||||
|
||||
return NbtFormat
|
||||
Reference in new issue
Block a user