azalea/azalea-nbt
2023-03-22 13:52:38 +00:00
..
benches Replace impl Read with Cursor<&[u8]> (#26) 2022-10-07 20:12:36 -05:00
src use compact_str in nbt 2023-03-22 13:52:38 +00:00
tests use compact_str in nbt 2023-03-22 13:52:38 +00:00
Cargo.toml use compact_str in nbt 2023-03-22 13:52:38 +00:00
README.md use compact_str in nbt 2023-03-22 13:52:38 +00:00

Azalea NBT

A fast NBT serializer and deserializer.

Examples

use ahash::AHashMap;
use azalea_nbt::Tag;
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(AHashMap::from_iter(vec![(
        "hello world".into(),
        Tag::Compound(AHashMap::from_iter(vec![(
            "name".into(),
            Tag::String("Bananrama".into()),
        )]))
    )]))
);