1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//! Nobility is a crate for decoding and encoding NBT (Named Binary
//! Tags), the format used by Minecraft for storing data.
//!
//! The decoder is meant to perform minimal allocations - most of its
//! types are views into the original data that was passed in.
//!
//! The encoder is builder-based and does not take in any kind of
//! document structure.
/// Contains the implementation of the binary format decoder.
/// Contains the implementation of the binary format encoder.
/// NBT tags are a 1-byte value used to specify which type is going to
/// follow. The integer values of each enum corresponds to the actual
/// ones used, and `tag as u8` can be used to cast these to their binary
/// representation.
///
/// Tags are sequentially allocated. As of writing (2020), the most
/// recent tag is `TAG_Long_Array`, added in Minecraft 1.12.