azalea/azalea-nbt
mat 157ac22461 remove unused dependencies
thanks cargo-udeps
2023-03-21 18:07:40 +00:00
..
benches Replace impl Read with Cursor<&[u8]> (#26) 2022-10-07 20:12:36 -05:00
src slightly optimize azalea_nbt::Tag::id 2023-03-11 16:38:13 -06:00
tests slightly optimize azalea_nbt::Tag::id 2023-03-11 16:38:13 -06:00
Cargo.toml remove unused dependencies 2023-03-21 18:07:40 +00:00
README.md slightly optimize azalea_nbt::Tag::id 2023-03-11 16:38:13 -06: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".to_string(),
        Tag::Compound(AHashMap::from_iter(vec![(
            "name".to_string(),
            Tag::String("Bananrama".to_string()),
        )]))
    )]))
);