named-binary-tag
NBT (Named Binary Tag) is a tag based binary format designed to carry large amounts of binary data with smaller amounts of additional data.
Usage
Add this to your Cargo.toml
:
[]
= "0.3"
Example
Read
use read_compound_tag;
use Cursor;
let mut cursor = new;
let root_tag = read_compound_tag.unwrap;
let servers = root_tag.get_compound_tag_vec.unwrap;
assert_eq!;
let server = servers;
let ip = server.get_str.unwrap;
let name = server.get_str.unwrap;
let hide_address = server.get_bool.unwrap;
assert_eq!;
assert_eq!;
assert!;
Write
use write_compound_tag;
use CompoundTag;
let mut server = new;
server.insert_str;
server.insert_str;
server.insert_bool;
let mut servers = Vec new;
servers.push;
let mut root_tag = new;
root_tag.insert_compound_tag_vec;
let mut vec = Vec new;
write_compound_tag.unwrap;