use nobility::bin_decode::Document;
use std::fs::File;
use std::io::Read;
fn main() {
let mut file = File::open("files/hello_world.nbt").expect("File to exist");
let mut data = vec![];
file.read_to_end(&mut data).expect("Read to succeed");
let cursor = std::io::Cursor::new(data);
let doc = Document::load(cursor).unwrap();
let (name, root) = doc.parse().unwrap();
println!("name: {}", name.decode().unwrap());
println!("{:#?}", root);
}