binary

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToMyStruct

func BytesToMyStruct(b []byte) unsafe.Pointer

func IntFromBinary

func IntFromBinary(b []byte) int

func IntToBinary

func IntToBinary(i int) []byte

func StructToBytes

func StructToBytes(s interface{}) []byte

func UIntFromBinary

func UIntFromBinary(b []byte) uint64

比标准库慢很多,10倍左右,string和bytes互转只是节省复制内存,unsafe操作有很多检测 binary.LittleEndian.Uint64(b)

func UIntToBinary

func UIntToBinary(i uint64) []byte

binary.LittleEndian.PutUint64(b)

Types

This section is empty.

Jump to

Keyboard shortcuts

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