Documentation ¶
Index ¶
- Constants
- func ArrayByteFloat(bs []byte) (result []float32)
- func BitLen(x int64) (n int64)
- func BoolToByte(b bool) []byte
- func ByteArray2UInt64(bs []byte) uint64
- func ByteToFloat32(bytes []byte) float32
- func ByteToFloat32Array(bytes []byte) ([]float32, error)
- func ByteToFloat64(bs []byte) float64
- func ByteToString(b []byte) string
- func ByteToUInt32(bs []byte) uint32
- func ByteToUInt64(bs []byte) uint64
- func ByteToUInt8Array(bytes []byte) ([]uint8, error)
- func ByteToVector(bs []byte) ([]float32, string, error)
- func ByteToVectorBinary(bs []byte, dimension int) ([]int32, string, error)
- func Bytes2Int(bs []byte) int64
- func Bytes2Int32(bs []byte) int32
- func Bytes2Long(bs []byte) int64
- func BytesToInt32(bys []byte) int32
- func CloneBytes(b []byte) []byte
- func Float64ToByte(v float64) []byte
- func FloatArray(fa []float32) (code string, err error)
- func FloatArrayByte(fa []float32) (code []byte, err error)
- func FormatByte(s uint64) string
- func FormatIByte(s uint64) string
- func Int64ToByte(v int64) []byte
- func StringToByte(s string) []byte
- func UInt32ToByte(v uint32) []byte
- func UInt8ArrayByte(in []uint8) (code []byte, err error)
- func UnsafeFloat32SliceAsByteSlice(floats []float32) []byte
- func ValueToByte(fa interface{}) ([]byte, error)
- func VectorBinaryToByte(vector []uint8, source string) ([]byte, error)
- func VectorToByte(vector []float32, source string) ([]byte, error)
Constants ¶
View Source
const ( Byte = 1 << (iota * 10) KB MB GB TB PB EB )
IEC Sizes.
View Source
const ( IByte = 1 IKB = IByte * 1000 IMB = IKB * 1000 IGB = IMB * 1000 ITB = IGB * 1000 IPB = ITB * 1000 IEB = IPB * 1000 )
SI Sizes.
Variables ¶
This section is empty.
Functions ¶
func ArrayByteFloat ¶
func BoolToByte ¶
func ByteArray2UInt64 ¶
func ByteToFloat32 ¶
func ByteToFloat32Array ¶
func ByteToFloat64 ¶
func ByteToString ¶
ByteToString convert bytes to string Note: string and slice share a block of memory, for scenarios where slice does not change
func ByteToUInt32 ¶
func ByteToUInt64 ¶
func ByteToUInt8Array ¶
func ByteToVectorBinary ¶
func Bytes2Int32 ¶
func Bytes2Long ¶
func BytesToInt32 ¶
func CloneBytes ¶
func Float64ToByte ¶
func FloatArray ¶
func FloatArrayByte ¶
func FormatByte ¶
FormatByte convert uint64 to human-readable byte strings
func FormatIByte ¶
FormatIByte convert uint64 to human-readable byte strings
func Int64ToByte ¶
func StringToByte ¶
StringToByte convert string to bytes Note: string and slice share a block of memory, for scenarios where slice does not change
func UInt32ToByte ¶
func UInt8ArrayByte ¶
func UnsafeFloat32SliceAsByteSlice ¶
Returns a slice of the bytes of the provided float64 slice. This allows highly performant access to large float64 slices for such things as computing hashes or simply writing the bytes to a file. BEWARE: this also means this []byte _is platform dependent_.
func ValueToByte ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.