Documentation ¶
Overview ¶
Package binaryutil contains convenience wrappers around encoding/binary.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ByteOrder ¶
type ByteOrder interface { PutUint16(v uint16) []byte PutUint32(v uint32) []byte PutUint64(v uint64) []byte Uint16(b []byte) uint16 Uint32(b []byte) uint32 Uint64(b []byte) uint64 }
ByteOrder is like binary.ByteOrder, but allocates memory and returns byte slices, for convenience.
var BigEndian ByteOrder = &bigEndian{}
BigEndian is like binary.BigEndian, but allocates memory and returns byte slices, for convenience.
var NativeEndian ByteOrder = &nativeEndian{}
NativeEndian is either little endian or big endian, depending on the native endian-ness, and allocates memory and returns byte slices, for convenience.
Click to show internal directories.
Click to hide internal directories.