blob: 3ff9ec1d39876edbcaefcfa3c2ec896e3d21a58e [file] [log] [blame] [raw]
#include <stdio.h>
#include <string.h>
#include "nbt.h"
int main(int argc, const char *argv[]) {
FILE *in = stdin;
if (argc > 1) {
in = fopen(argv[1], "rb");
if (!in) {
perror("fopen");
return -1;
}
}
char buf[65536];
size_t len = fread(buf, 1, sizeof(buf), in);
nbt_parse(buf, len);
}