Documentation ¶
Index ¶
- func GetNextBlock(data []byte) ([]byte, int, error)
- func Pack16(n uint16) []byte
- func Pack32(n uint32) []byte
- func Pack64(n uint64) []byte
- func Pack8(n uint8) []byte
- func PrependLength(data []byte) []byte
- func Unpack16(blob []byte) (uint16, int, error)
- func Unpack32(blob []byte) (uint32, int, error)
- func Unpack64(blob []byte) (uint64, int, error)
- func Unpack8(blob []byte) (uint8, int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetNextBlock ¶
GetNextBlock extract the integer from the beginning of the given byte slice and returns the remaining bytes, the extracted integer, and whether there was an error.
func PrependLength ¶
PrependLength prepends the varint encoded length of the byte slice to itself.
func Unpack16 ¶
Unpack16 unpacks a VarInt into a uint16. It returns the extracted int, how many bytes were used and an error.
func Unpack32 ¶
Unpack32 unpacks a VarInt into a uint32. It returns the extracted int, how many bytes were used and an error.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.