#include "tag.h" #include "lib.h" #include int main (int argc, char** argv) { if (argc != 2) { printf("usage: nbtvis file.nbt\n"); return 0; } stream_t stream = stream_open(argv[1], "rb"); tag_t tag; if (tag_read(&tag, &stream, true) == false) error_and_die("failed to read tag\n"); if (tag.type != TAG_COMPOUND) error_and_die("root tag is not of type compound\n"); tag_print(&tag); stream_close(&stream); }