Documentation ¶
Index ¶
- Variables
- type Bytes
- func (Bytes) FromF32(s []float32, d []byte, r bool) int
- func (Bytes) FromF64(s []float64, d []byte, r bool) int
- func (Bytes) FromI16(s []int16, d []byte, r bool) int
- func (Bytes) FromI32(s []int32, d []byte, r bool) int
- func (Bytes) FromI64(s []int64, d []byte, r bool) int
- func (Bytes) FromI8(s []int8, d []byte) int
- func (Bytes) FromSlice(s interface{}, dst []byte, rotate bool) (n int, err error)
- func (Bytes) FromU16(s []uint16, d []byte, r bool) int
- func (Bytes) FromU32(s []uint32, d []byte, r bool) int
- func (Bytes) FromU64(s []uint64, d []byte, r bool) int
- func (Bytes) FromValue(s reflect.Value, dst []byte, rotate bool) (n int, err error)
- func (Bytes) ToF32(s []byte, d []float32, r bool) int
- func (Bytes) ToF64(s []byte, d []float64, r bool) int
- func (Bytes) ToI16(s []byte, d []int16, r bool) int
- func (Bytes) ToI32(s []byte, d []int32, r bool) int
- func (Bytes) ToI64(s []byte, d []int64, r bool) int
- func (Bytes) ToI8(s []byte, d []int8) int
- func (Bytes) ToSlice(src []byte, d interface{}, rotate bool) (n int, err error)
- func (Bytes) ToU16(s []byte, d []uint16, r bool) int
- func (Bytes) ToU32(s []byte, d []uint32, r bool) int
- func (Bytes) ToU64(s []byte, d []uint64, r bool) int
- func (Bytes) ToValue(src []byte, d reflect.Value, rotate bool) (n int, err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var IsLittleEndian = func() bool { test := u8Tou16([]byte{0xEF, 0xBE}) return checkEndianess(test[0]) }()
IsLittleEndian this checks if the current system is little endian.
Functions ¶
This section is empty.
Types ¶
type Bytes ¶
type Bytes struct{}
Bytes a bytes provider that uses unsafe
func (Bytes) FromSlice ¶
FromSlice copies bytes from the given interface. The provided interface must be a type that can be safely copied. The given slice must be large enough to fit all the bytes in `s`
func (Bytes) FromValue ¶
FromValue copies bytes from the given value. The provided value must be a type that can be safely converted to bytes. The given slice must be large enough to fit all bytes in `s`
func (Bytes) ToSlice ¶
ToSlice copies bytes from `s` into the given slice. The given interface must be a type that can be safely written to. `d` must be large enough to fit all the bytes in `s`.
Click to show internal directories.
Click to hide internal directories.