1
2
Fork 0
mirror of https://github.com/mat-1/azalea.git synced 2025-08-02 23:44:38 +00:00
azalea/azalea-nbt
2023-03-23 00:19:00 -05:00
..
benches make encode not a Result and small optimizations 2023-03-23 00:19:00 -05:00
src make encode not a Result and small optimizations 2023-03-23 00:19:00 -05:00
tests make encode not a Result and small optimizations 2023-03-23 00:19:00 -05:00
Cargo.toml binary search map 2023-03-22 23:18:55 -05:00
README.md make encode not a Result and small optimizations 2023-03-23 00:19:00 -05:00

Azalea NBT

A fast NBT serializer and deserializer.

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()),
        )]))
    )]))
);