util

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 License: GPL-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetByte

func GetByte(data []byte, offset int) byte

GetByte 获取offset位置的byte

func GetBytes

func GetBytes(data []byte, offset, length int) []byte

GetBytes 获取从offset开始的length个byte

func GetBytesCopy

func GetBytesCopy(data []byte, offset, length int) []byte

GetBytesCopy 获取从offset开始的length个byte的拷贝

func GetUint16

func GetUint16(data []byte, offset int) uint16

GetUint16 从offset位置获取2个byte的uint16

func GetUint24

func GetUint24(data []byte, offset int) uint32

GetUint24 从offset位置获取3个byte的uint16

func GetUint32

func GetUint32(data []byte, offset int) uint32

GetUint32 从offset位置获取4个byte的uint32

func SetBytes

func SetBytes(data []byte, offset, length int, val []byte)

SetBytes 将val存放在offset开始的length个byte中

func SetUint16

func SetUint16(data []byte, offset int, val uint16)

SetUint16 将val放在offset起始的2个byte中

func SetUint24

func SetUint24(data []byte, offset int, val uint32)

SetUint24 将val放在offset起始的3个byte中

func SetUint32

func SetUint32(data []byte, offset int, val uint32)

SetUint32 将val放在offset起始的4个byte中

func UInt32ToBytesSlice

func UInt32ToBytesSlice(i uint32) []byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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