Documentation
¶
Index ¶
- func AddInt32(data []int32, value int32)
- func AddInt64(data []int64, value int64)
- func BitCount(count int) uint
- func BoolToBytes(data []bool) []byte
- func ByteCount(count uint) int
- func BytesToBool(data []byte) []bool
- func BytesToFloat32(data []byte) []float32
- func BytesToFloat64(data []byte) []float64
- func BytesToInt16(data []byte) []int16
- func BytesToInt32(data []byte) []int32
- func BytesToInt64(data []byte) []int64
- func BytesToInt8(data []byte) []int8
- func BytesToString(data []byte) string
- func BytesToUint128(data []byte) [][16]byte
- func BytesToUint32(data []byte) []uint32
- func BytesToUint64(data []byte) []uint64
- func CountByte(data []byte, value byte) int
- func Fill(dst []byte, dstWidth uint, src uint64, srcWidth uint) int
- func Float32ToBytes(data []float32) []byte
- func Float32ToUint32(data []float32) []uint32
- func Float64ToBytes(data []float64) []byte
- func Float64ToUint64(data []float64) []uint64
- func IndexShift16(bitIndex uint) (index, shift uint)
- func IndexShift32(bitIndex uint) (index, shift uint)
- func IndexShift64(bitIndex uint) (index, shift uint)
- func IndexShift8(bitIndex uint) (index, shift uint)
- func Int16ToBytes(data []int16) []byte
- func Int16ToUint16(data []int16) []uint16
- func Int32ToBytes(data []int32) []byte
- func Int32ToUint32(data []int32) []uint32
- func Int64ToBytes(data []int64) []byte
- func Int64ToUint64(data []int64) []uint64
- func Int8ToBytes(data []int8) []byte
- func Len16(i int16) int
- func Len32(i int32) int
- func Len64(i int64) int
- func Len8(i int8) int
- func MaxBool(data []bool) (max bool)
- func MaxFixedLenByteArray(size int, data []byte) (max []byte)
- func MaxFloat32(data []float32) (max float32)
- func MaxFloat64(data []float64) (max float64)
- func MaxInt32(data []int32) (max int32)
- func MaxInt64(data []int64) (max int64)
- func MaxLen16(data []int16) int
- func MaxLen32(data []int32) int
- func MaxLen64(data []int64) int
- func MaxLen8(data []int8) int
- func MaxUint32(data []uint32) (max uint32)
- func MaxUint64(data []uint64) (max uint64)
- func MinBool(data []bool) (min bool)
- func MinFixedLenByteArray(size int, data []byte) (min []byte)
- func MinFloat32(data []float32) (min float32)
- func MinFloat64(data []float64) (min float64)
- func MinInt32(data []int32) (min int32)
- func MinInt64(data []int64) (min int64)
- func MinMaxBool(data []bool) (min, max bool)
- func MinMaxFixedLenByteArray(size int, data []byte) (min, max []byte)
- func MinMaxFloat32(data []float32) (min, max float32)
- func MinMaxFloat64(data []float64) (min, max float64)
- func MinMaxInt32(data []int32) (min, max int32)
- func MinMaxInt64(data []int64) (min, max int64)
- func MinMaxUint32(data []uint32) (min, max uint32)
- func MinMaxUint64(data []uint64) (min, max uint64)
- func MinUint32(data []uint32) (min uint32)
- func MinUint64(data []uint64) (min uint64)
- func NearestPowerOfTwo(v int) int
- func NearestPowerOfTwo32(v uint32) uint32
- func NearestPowerOfTwo64(v uint64) uint64
- func OrderOfBool(data []bool) int
- func OrderOfBytes(data [][]byte) int
- func OrderOfFloat32(data []float32) int
- func OrderOfFloat64(data []float64) int
- func OrderOfInt32(data []int32) int
- func OrderOfInt64(data []int64) int
- func OrderOfUint32(data []uint32) int
- func OrderOfUint64(data []uint64) int
- func Pack(dst []byte, dstWidth uint, src []byte, srcWidth uint) int
- func Round(count uint) uint
- func ShiftRight(data []byte, shift uint)
- func SubInt32(data []int32, value int32)
- func SubInt64(data []int64, value int64)
- func Uint128ToBytes(data [][16]byte) []byte
- func Uint32ToBytes(data []uint32) []byte
- func Uint32ToInt32(data []uint32) []int32
- func Uint64ToBytes(data []uint64) []byte
- func Uint64ToInt64(data []uint64) []int64
- type Reader
- type Writer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BoolToBytes ¶
func BytesToBool ¶
func BytesToFloat32 ¶
func BytesToFloat64 ¶
func BytesToInt16 ¶
func BytesToInt32 ¶
func BytesToInt64 ¶
func BytesToInt8 ¶
func BytesToString ¶
func BytesToUint128 ¶
func BytesToUint32 ¶
func BytesToUint64 ¶
func Fill ¶
Fill is an algorithm similar to the stdlib's bytes.Repeat, it writes repeated copies of the source pattern to the destination, returning the number of copies made.
func Float32ToBytes ¶
func Float32ToUint32 ¶
func Float64ToBytes ¶
func Float64ToUint64 ¶
func IndexShift16 ¶
func IndexShift32 ¶
func IndexShift64 ¶
func IndexShift8 ¶
func Int16ToBytes ¶
func Int16ToUint16 ¶
func Int32ToBytes ¶
func Int32ToUint32 ¶
func Int64ToBytes ¶
func Int64ToUint64 ¶
func Int8ToBytes ¶
func MaxFixedLenByteArray ¶
func MaxFloat32 ¶
func MaxFloat64 ¶
func MinFixedLenByteArray ¶
func MinFloat32 ¶
func MinFloat64 ¶
func MinMaxBool ¶
func MinMaxFixedLenByteArray ¶
func MinMaxFloat32 ¶
func MinMaxFloat64 ¶
func MinMaxInt32 ¶
func MinMaxInt64 ¶
func MinMaxUint32 ¶
func MinMaxUint64 ¶
func NearestPowerOfTwo ¶
func NearestPowerOfTwo32 ¶
func NearestPowerOfTwo64 ¶
func OrderOfBool ¶
func OrderOfBytes ¶
func OrderOfFloat32 ¶
func OrderOfFloat64 ¶
func OrderOfInt32 ¶
func OrderOfInt64 ¶
func OrderOfUint32 ¶
func OrderOfUint64 ¶
func Pack ¶
Pack copies words of size srcWidth (in bits) from the src buffer to words of size dstWidth (in bits) in the dst buffer, returning the number of words that were packed.
When dstWidth is greater than srcWidth, the upper bits of the destination word are set to zero.
When srcWidth is greater than dstWith, the upper bits of the source are discarded.
The function always writes full bytes to dst, if the last word written does not end on a byte boundary, the remaining bits are set to zero.
The source and destination buffers must not overlap.