byteutil

package
v3.32.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 18, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package byteutil provides utilities for working with bytes using little endian binary encoding.

Index

Constants

View Source
const MaxUint24 = 1<<24 - 1

MaxUint24 is the maximum value representable 3-octet uint.

Variables

This section is empty.

Functions

func AppendUint16

func AppendUint16(dst []byte, v uint16, byteCount uint8) []byte

AppendUint16 appends v to dst using little endian binary encoding using at most byteCount bytes.

func AppendUint32

func AppendUint32(dst []byte, v uint32, byteCount uint8) []byte

AppendUint32 appends v to dst using little endian binary encoding using at most byteCount bytes.

func AppendUint64

func AppendUint64(dst []byte, v uint64, byteCount uint8) []byte

AppendUint64 appends v to dst using little endian binary encoding using at most byteCount bytes.

func ParseUint16 added in v3.28.0

func ParseUint16(b []byte) uint16

ParseUint16 parses uint16 from b assuming little endian binary encoding.

func ParseUint32

func ParseUint32(b []byte) uint32

ParseUint32 parses uint32 from b assuming little endian binary encoding.

func ParseUint64

func ParseUint64(b []byte) uint64

ParseUint64 parses uint64 from b assuming little endian binary encoding.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL