azalea/azalea-nbt
2023-03-22 23:18:55 -05:00
..
benches binary search map 2023-03-22 23:18:55 -05:00
src binary search map 2023-03-22 23:18:55 -05:00
tests binary search map 2023-03-22 23:18:55 -05:00
Cargo.toml binary search map 2023-03-22 23:18:55 -05:00
README.md binary search map 2023-03-22 23:18:55 -05:00

Azalea NBT

A fast NBT serializer and deserializer.

Note: Running your code with RUSTFLAGS="-C target-cpu=native" will result in significant performance improvements.

Examples

use azalea_nbt::{Tag, NbtCompound};
use std::io::Cursor;

let buf = include_bytes!("../tests/hello_world.nbt");
let tag = Tag::read(&mut Cursor::new(&buf[..])).unwrap();
assert_eq!(
    tag,
    Tag::Compound(NbtCompound::from_iter(vec![(
        "hello world".into(),
        Tag::Compound(NbtCompound::from_iter(vec![(
            "name".into(),
            Tag::String("Bananrama".into()),
        )]))
    )]))
);