gbytes

package
v0.0.0-...-04ff805 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	EncodeBase64 = "base64"
	EncodeBase58 = "base58"
)

Variables

This section is empty.

Functions

func BytesToInt32

func BytesToInt32(b []byte) (int32, error)

func BytesToInt64

func BytesToInt64(b []byte) (int64, error)

func BytesToNum

func BytesToNum(b []byte, numTypeSample interface{}) (interface{}, error)

func BytesToUint32

func BytesToUint32(b []byte) (uint32, error)

func BytesToUint64

func BytesToUint64(b []byte) (uint64, error)

func Clone2

func Clone2(src, dst interface{}) error

深拷贝任意对象,完整复制数据

func DecodeBool

func DecodeBool(p []byte, c *bool) []byte

decode 8 bits bool

func DecodeUint16

func DecodeUint16(p []byte, w *uint16) []byte

decode 16 bits unsigned int (lsb)

func DecodeUint32

func DecodeUint32(p []byte, l *uint32) []byte

decode 32 bits unsigned int (lsb)

func DecodeUint64

func DecodeUint64(p []byte, l *uint64) []byte

decode 64 bits unsigned int (lsb)

func DecodeUint8

func DecodeUint8(p []byte, c *byte) []byte

decode 8 bits unsigned int

func DeepCopy

func DeepCopy(dst, src interface{}) error

func DeepCopyEx

func DeepCopyEx(src interface{}) (interface{}, error)

func Encode

func Encode(encode string, binary []byte) (text string, err error)

func EncodeBool

func EncodeBool(p []byte, c bool) []byte

encode 8 bits bool

func EncodeUint16

func EncodeUint16(p []byte, w uint16) []byte

encode 16 bits unsigned int (lsb)

func EncodeUint32

func EncodeUint32(p []byte, l uint32) []byte

encode 32 bits unsigned int (lsb)

func EncodeUint64

func EncodeUint64(p []byte, l uint64) []byte

encode 64 bits unsigned int (lsb)

func EncodeUint8

func EncodeUint8(p []byte, c uint8) []byte

encode 8 bits unsigned int

func Index

func Index(p []byte, toSearch byte) int

func NumToBytes

func NumToBytes(n interface{}) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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