Package binary

Package binary implements functions for processing binary data.

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetUint
func GetUint(d []byte) uint

GetUint gets a MSB-encoded unsigned integer from the argument buffer. The size of the result number is determined by the length of the input buffer.

func GetUint32
func GetUint32(d []byte) uint32

GetUint32 gets a MSB-encoded uint32 value from the argument buffer.

func GetUint32LSB
func GetUint32LSB(d []byte) uint32

GetUint32 gets a LSB-encoded uint32 value from the argument buffer.

func HammingDistance
func HammingDistance(a, b uint) uint
func PutUint
func PutUint(d []byte, offset int, v uint) []byte

PutUint puts the unsigned integer v to the buffer d starting from the offset offset in MSB-order. The number of bytes encoded is determined by the size of the input value v.

func PutUint32
func PutUint32(d []byte, offset int, v uint32) []byte

PutUint32 puts the uint32 value v to the buffer d starting from the offset offset in MSB-order.

Types

This section is empty.