binary

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsLittleEndian = defaultEndian() // 是否小端字节序, go默认是小端
)

Functions

func Repeat

func Repeat(b []byte, count int) []byte

func ToBytes

func ToBytes[E kind.BaseType](x E) []byte

ToBytes x的内存空间直接转成字节切片

func ToSlice

func ToSlice[T kind.BaseType](data []byte, n int) []T

ToSlice 内存空间字节数组直接转成泛型切片

Types

type Memory

type Memory struct {
	// contains filtered or unexported fields
}

func Mem2

func Mem2(data []byte) Memory

func MemData

func MemData[E any](x E) Memory

func (Memory) Bytes

func (m Memory) Bytes() []byte

func (Memory) Float64

func (m Memory) Float64() float64

func (Memory) Inf64

func (m Memory) Inf64() int64

func (Memory) String

func (m Memory) String() string

type SliceHeader

type SliceHeader = reflect.SliceHeader

Jump to

Keyboard shortcuts

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