Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrVarIntTooBig = errors.New("mcproto: var int is too big")
)
Functions ¶
func DecodeReaderVarInt ¶
DecodeReaderVarInt takes an io.Reader as a parameter and returns in order:
- the result varint
- the number of bytes read
- an eventual error
NOTE: It returns the number of bytes read even in occurance of an error
func EncodeVarInt ¶
EncoeVarInt is an implementation of the varint encoding as specified on wiki.vg
It takes an int32 as an input, and returns the encoded varint in the form of a byte slice, and also returns n which is the number of bytes the varint takes
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.