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 GetUint64
func GetUint64(d []byte) uint64

GetUint64 gets a MSB-encoded uint64 value from the argument buffer.

func GetUint64LSB
func GetUint64LSB(d []byte) uint64

GetUint64LSB gets a LSB-encoded uint64 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.

func PutUint64
func PutUint64(d []byte, offset int, v uint64) []byte

PutUint64 puts the uint64 value v to the buffer d starting from the offset offset in MSB-order.

Types

This section is empty.