Documentation ¶
Overview ¶
Package byteutil provides utilities for working with bytes using little endian binary encoding.
Index ¶
- Constants
- func AppendUint16(dst []byte, v uint16, byteCount uint8) []byte
- func AppendUint32(dst []byte, v uint32, byteCount uint8) []byte
- func AppendUint64(dst []byte, v uint64, byteCount uint8) []byte
- func ParseUint16(b []byte) uint16
- func ParseUint32(b []byte) uint32
- func ParseUint64(b []byte) uint64
Constants ¶
const MaxUint24 = 1<<24 - 1
MaxUint24 is the maximum value representable 3-octet uint.
Variables ¶
This section is empty.
Functions ¶
func AppendUint16 ¶
AppendUint16 appends v to dst using little endian binary encoding using at most byteCount bytes.
func AppendUint32 ¶
AppendUint32 appends v to dst using little endian binary encoding using at most byteCount bytes.
func AppendUint64 ¶
AppendUint64 appends v to dst using little endian binary encoding using at most byteCount bytes.
func ParseUint16 ¶ added in v3.28.0
ParseUint16 parses uint16 from b assuming little endian binary encoding.
func ParseUint32 ¶
ParseUint32 parses uint32 from b assuming little endian binary encoding.
func ParseUint64 ¶
ParseUint64 parses uint64 from b assuming little endian binary encoding.
Types ¶
This section is empty.