bytes

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NativeEndian binary.ByteOrder

NativeEndian represents the endianness of the current machine

Functions

func InitNativeEndian

func InitNativeEndian(b []byte)

InitNativeEndian figures out the endianness of the current machine (https://stackoverflow.com/questions/51332658/any-better-way-to-check-endianness-in-go)

func ReadUint16

func ReadUint16(b []byte) uint16

ReadUint16 reads the uint16 value from the byte slice.

func ReadUint32

func ReadUint32(b []byte) uint32

ReadUint32 reads the uint32 value from the byte slice.

func ReadUint64

func ReadUint64(b []byte) uint64

ReadUint64 reads the uint64 value from the byte slice.

func WriteUint16

func WriteUint16(v uint16) (b []byte)

WriteUint16 writes the provided uint16 value to byte slice.

func WriteUint32

func WriteUint32(v uint32) (b []byte)

WriteUint32 writes the provided uint32 value to byte slice.

func WriteUint64

func WriteUint64(v uint64) (b []byte)

WriteUint64 writes the provided uint64 value to byte slice.

Types

This section is empty.

Jump to

Keyboard shortcuts

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