package
1.44.0
Repository: https://github.com/sandertv/gophertunnel.git
Documentation: pkg.go.dev

# Functions

Dump returns a human readable decoded version of a serialised slice of NBT encoded using the encoding that is passed.
Marshal encodes an object to its NBT representation and returns it as a byte slice.
MarshalEncoding encodes an object to its NBT representation and returns it as a byte slice.
NewDecoder returns a new Decoder for the input stream reader passed.
NewDecoderWithEncoding returns a new Decoder for the input stream reader passed with a specific encoding.
NewEncoder returns a new encoder for the output stream writer passed.
NewEncoderWithEncoding returns a new encoder for the output stream writer passed using a specific encoding.
Unmarshal decodes a slice of NBT data into a pointer to a Go values passed.
UnmarshalEncoding decodes a slice of NBT data into a pointer to a Go values passed using the NBT encoding passed.

# Variables

BigEndian is the fixed size big endian implementation of NBT.
LittleEndian is the fixed size little endian implementation of NBT.
NetworkBigEndian is a version of BigEndian introduced in 1.20.2 where the name of the root compound tag is not written.
NetworkLittleEndian is the variable sized integer implementation of NBT.

# Structs

BufferOverrunError is returned when the data buffer passed in when reading is overrun, meaning one of the reading operations extended beyond the end of the slice.
Decoder reads NBT objects from an NBT input stream.
Encoder writes NBT objects to an NBT output stream.
FailedWriteError is returned if a Write operation failed on an offsetWriter, meaning some of the data could not be written to the io.Writer.
IncompatibleTypeError is returned if a value is attempted to be written to an io.Writer, but its type can- not be translated to an NBT tag.
InvalidArraySizeError is returned when an array read from the NBT (that includes byte arrays, int32 arrays and int64 arrays) does not have the same size as the Go representation.
InvalidStringError is returned if a string read is not valid, meaning it does not exist exclusively out of utf8 characters, or if it is longer than the length prefix can carry.
InvalidTypeError is returned when the type of a tag read is not equal to the struct field with the name of that tag.
InvalidVarintError is returned if a varint(32/64) is encountered that does not end after 5 or 10 bytes respectively.
MaximumBytesReadError is returned if the maximum amount of bytes has been read for NetworkLittleEndian format.
MaximumDepthReachedError is returned if the maximum depth of 512 compound/list tags has been reached while reading or writing NBT.
NonPointerTypeError is returned when the type of value passed in Decoder.Decode or Unmarshal is not a pointer.
UnexpectedNamedTagError is returned when a named tag is read from a compound which is not present in the struct it is decoded into.
UnexpectedTagError is returned when a tag type encountered was not expected, and thus valid in its context.
UnknownTagError is returned when the type of tag read is not known, meaning it is not found in the tag.go file.

# Interfaces

Encoding is an encoding variant of NBT.