#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include "buffer.h"
#include "list.h"
Go to the source code of this file.
|
enum | nbt_status {
NBT_OK = 0,
NBT_ERR = -1,
NBT_EMEM = -2,
NBT_EIO = -3,
NBT_EZ = -4
} |
|
enum | nbt_type {
TAG_INVALID = 0,
TAG_BYTE = 1,
TAG_SHORT = 2,
TAG_INT = 3,
TAG_LONG = 4,
TAG_FLOAT = 5,
TAG_DOUBLE = 6,
TAG_BYTE_ARRAY = 7,
TAG_STRING = 8,
TAG_LIST = 9,
TAG_COMPOUND = 10,
TAG_INT_ARRAY = 11
} |
|
enum | nbt_compression_strategy { STRAT_GZIP,
STRAT_INFLATE
} |
|
|
nbt_node * | nbt_parse_file (FILE *fp) |
|
nbt_node * | nbt_parse_path (const char *filename) |
|
nbt_node * | nbt_parse_compressed (const void *chunk_start, size_t length) |
|
nbt_status | nbt_dump_file (const nbt_node *tree, FILE *fp, nbt_compression_strategy) |
|
struct buffer | nbt_dump_compressed (const nbt_node *tree, nbt_compression_strategy) |
|
nbt_node * | nbt_parse (const void *memory, size_t length) |
|
char * | nbt_dump_ascii (const nbt_node *tree) |
|
struct buffer | nbt_dump_binary (const nbt_node *tree) |
|
nbt_node * | nbt_clone (nbt_node *) |
|
void | nbt_free (nbt_node *) |
|
void | nbt_free_list (struct nbt_list *) |
|
bool | nbt_map (nbt_node *tree, nbt_visitor_t, void *aux) |
|
nbt_node * | nbt_filter (const nbt_node *tree, nbt_predicate_t, void *aux) |
|
nbt_node * | nbt_filter_inplace (nbt_node *tree, nbt_predicate_t, void *aux) |
|
nbt_node * | nbt_find (nbt_node *tree, nbt_predicate_t, void *aux) |
|
nbt_node * | nbt_find_by_name (nbt_node *tree, const char *name) |
|
nbt_node * | nbt_find_by_path (nbt_node *tree, const char *path) |
|
size_t | nbt_size (const nbt_node *tree) |
|
nbt_node * | nbt_list_item (nbt_node *list, int n) |
|
bool | nbt_eq (const nbt_node *restrict a, const nbt_node *restrict b) |
|
const char * | nbt_type_to_string (nbt_type) |
|
const char * | nbt_error_to_string (nbt_status) |
|
typedef bool(* nbt_predicate_t)(const nbt_node *node, void *aux) |
typedef bool(* nbt_visitor_t)(nbt_node *node, void *aux) |
Enumerator |
---|
STRAT_GZIP |
|
STRAT_INFLATE |
|
Definition at line 50 of file nbt.h.
Enumerator |
---|
NBT_OK |
|
NBT_ERR |
|
NBT_EMEM |
|
NBT_EIO |
|
NBT_EZ |
|
Definition at line 26 of file nbt.h.
Enumerator |
---|
TAG_INVALID |
|
TAG_BYTE |
|
TAG_SHORT |
|
TAG_INT |
|
TAG_LONG |
|
TAG_FLOAT |
|
TAG_DOUBLE |
|
TAG_BYTE_ARRAY |
|
TAG_STRING |
|
TAG_LIST |
|
TAG_COMPOUND |
|
TAG_INT_ARRAY |
|
Definition at line 34 of file nbt.h.
char* nbt_dump_ascii |
( |
const nbt_node * |
tree | ) |
|
void nbt_free_list |
( |
struct nbt_list * |
| ) |
|
nbt_node* nbt_parse |
( |
const void * |
memory, |
|
|
size_t |
length |
|
) |
| |
nbt_node* nbt_parse_compressed |
( |
const void * |
chunk_start, |
|
|
size_t |
length |
|
) |
| |
nbt_node* nbt_parse_path |
( |
const char * |
filename | ) |
|
size_t nbt_size |
( |
const nbt_node * |
tree | ) |
|
const char* nbt_type_to_string |
( |
nbt_type |
| ) |
|