Documentation ¶
Index ¶
- func AppendLongData(input []byte, data []byte) []byte
- func AppendShortData(input []byte, data []byte) []byte
- func AppendUint16(input []byte, value uint16) []byte
- func AppendUint32(input []byte, value uint32) []byte
- func AppendUint64(input []byte, value uint64) []byte
- func AppendUint8(input []byte, value uint8) []byte
- func MaxUint16(a, b uint16) uint16
- func ReadFromBuffer(reader io.Reader, length int) ([]byte, error)
- func ReadLongDataFromReader(reader io.Reader) ([]byte, error)
- func ReadShortData(input []byte) (data []byte, rest []byte, err error)
- func ReadShortDataFromReader(reader io.Reader) ([]byte, error)
- func ReadSlice(input []byte, size int) (value []byte, rest []byte, err error)
- func ReadUint16(input []byte) (value uint16, rest []byte, err error)
- func ReadUint32(input []byte) (value uint32, rest []byte, err error)
- func ReadUint64(input []byte) (value uint64, rest []byte, err error)
- func ReadUint8(input []byte) (value uint8, rest []byte, err error)
- func Uint16ToBinary(integer uint16) []byte
- func Uint64ToBinary(integer uint64) []byte
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendLongData ¶
AppendLongData appends data shorter than 32MB
func AppendShortData ¶
AppendShortData appends data shorter than 16kB
func AppendUint16 ¶
AppendUint16 appends the value bytes to the input slice (big endian)
func AppendUint32 ¶
AppendUint32 appends the value bytes to the input slice (big endian)
func AppendUint64 ¶
AppendUint64 appends the value bytes to the input slice (big endian)
func AppendUint8 ¶
AppendUint8 appends the value byte to the input slice
func ReadFromBuffer ¶
ReadFromBuffer reads 'length' bytes from the input
func ReadLongDataFromReader ¶
ReadLongDataFromReader reads data shorter than 16kB from reader
func ReadShortData ¶
ReadShortData read data shorter than 16kB and return the rest of bytes
func ReadShortDataFromReader ¶
ReadShortDataFromReader reads data shorter than 16kB from reader
func ReadUint16 ¶
ReadUint16 reads a uint16 from the input and returns the rest
func ReadUint32 ¶
ReadUint32 reads a uint32 from the input and returns the rest
func ReadUint64 ¶
ReadUint64 reads a uint64 from the input and returns the rest
func Uint16ToBinary ¶
Uint16ToBinary converst a uint16 to a byte slice (big endian)
func Uint64ToBinary ¶
Uint64ToBinary converst a uint64 to a byte slice (big endian)
Types ¶
This section is empty.