pub fn to_binary<W, S, R>(
comp: &Compound<S>,
writer: W,
root_name: &R,
) -> Result<(), Error>
Expand description
Encodes uncompressed NBT binary data to the provided writer.
Only compounds are permitted at the top level. This is why the function
accepts a Compound
reference rather than a Value
.
Additionally, the root compound can be given a name. Typically the empty
string ""
is used.