26static_assert(CHAR_BIT == 8);
28#define CLOD_NBT_ZERO (char)(0)
29#define CLOD_NBT_INT8 (char)(1)
30#define CLOD_NBT_INT16 (char)(2)
31#define CLOD_NBT_INT32 (char)(3)
32#define CLOD_NBT_INT64 (char)(4)
33#define CLOD_NBT_FLOAT32 (char)(5)
34#define CLOD_NBT_FLOAT64 (char)(6)
35#define CLOD_NBT_INT8_ARRAY (char)(7)
36#define CLOD_NBT_INT32_ARRAY (char)(11)
37#define CLOD_NBT_INT64_ARRAY (char)(12)
38#define CLOD_NBT_STRING (char)(8)
39#define CLOD_NBT_LIST (char)(9)
40#define CLOD_NBT_COMPOUND (char)(10)
42#define CLOD_NBT_ROOT_COMPOUND_INIT ((char[]){CLOD_NBT_COMPOUND, 0, 0, 0})
43#define CLOD_NBT_ROOT_LIST_INIT(type) ((char[]){CLOD_NBT_LIST, type, 0, 0, 0, 0})
54CLOD_API CLOD_PURE CLOD_NONNULL(1, 2)
56 const
char *restrict payload,
68CLOD_API CLOD_PURE CLOD_NONNULL(1)
78CLOD_API CLOD_PURE CLOD_NONNULL(1, 2)
88CLOD_API CLOD_PURE CLOD_NONNULL(1, 2)
109#define CLOD_NBT_ITER_ZERO { .type = CLOD_NBT_ZERO }
124CLOD_API CLOD_USE_RETURN CLOD_NONNULL(1, 2, 4)
126 const
char *restrict payload,
140CLOD_API CLOD_NONNULL(1, 2)
142 const
char *restrict compound,
162CLOD_API CLOD_NONNULL(2, 3)
164 char *restrict compound,
180CLOD_API CLOD_NONNULL(1, 2, 3)
182 char *restrict compound,
199CLOD_API CLOD_NONNULL(2)
Methods for big-endian encoding numbers.
char * clod_nbt_compound_get(const char *restrict compound, const void *end, clod_sstr name)
bool clod_nbt_iter_next(const char *restrict payload, const void *end, char payload_type, struct clod_nbt_iter *iter)
bool clod_nbt_list_resize(char *restrict list, const char **end, ptrdiff_t *free, char type, uint32_t length)
bool clod_nbt_compound_del(char *restrict compound, const void **end, ptrdiff_t *free, clod_sstr name)
char * clod_nbt_compound_add(char *restrict compound, const void **end, ptrdiff_t *free, clod_sstr name, char type)
clod_sstr clod_nbt_tag_name(const char *tag, const void *end)
size_t clod_nbt_payload_size(const char *restrict payload, const void *end, char payload_type)
char * clod_nbt_tag_payload(const char *restrict tag, const void *end)
size_t clod_nbt_tag_size(const char *restrict tag, const void *end)