modify the array bytelength function to get the bytelength of a single tag.

This commit is contained in:
2025-07-23 16:31:08 +02:00
parent 2daeb9823c
commit 1fb878b5ae
2 changed files with 31 additions and 52 deletions

View File

@@ -40,6 +40,8 @@ int nbt_proc(void **restrict datout, u8 const *restrict buf, size_t len);
* returns a boolean value. */
atrb_const int nbt_isprim(u8 tag);
/* gets the byte size of an NBT tag's data (excluding id and name), returns `0` upon error. */
atrb_const size_t nbt_tagdatlen(u8 const *buf);
/* gets the tag size of primitive types, returns `>0` on success, `<0` on failure */
atrb_const int nbt_primsize(u8 tag);