Documentation ¶
Index ¶
- Variables
- func BytesToHexString(buf []byte) string
- func BytesToInt16(buf []byte, offset int) int16
- func BytesToInt32(buf []byte, offset int) int32
- func BytesToInt64(buf []byte, offset int) int64
- func BytesToIntIntel(buf []byte, offset int) int
- func BytesToNumber(buf []byte, offset, length int) interface{}
- func GetUnsigned(b byte) int
- func Int16ToBytes(num int16, buffer []byte, offset int) []byte
- func Int32ToBytes(num int32, buffer []byte, offset int) []byte
- func Int64ToBytes(num int64, buffer []byte, offset int) []byte
- func VarBytesToInt64(buf []byte, offset int, len int) int64
Constants ¶
This section is empty.
Variables ¶
View Source
var Arch32Bits = (sizeOfInt == sizeOfInt32)
View Source
var Arch64Bits = (sizeOfInt == sizeOfInt64)
Functions ¶
func BytesToHexString ¶
Coverts a byte slice into a hex string
func BytesToInt32 ¶
Covertes a slice into int32; only maximum of 4 bytes will be used
func BytesToInt64 ¶
Covertes a slice into int64; only maximum of 8 bytes will be used
func BytesToIntIntel ¶
func BytesToNumber ¶
converts a slice of bytes into an interger with appropriate type
func GetUnsigned ¶
func Int32ToBytes ¶
Converts an int32 to a byte slice of size 4
func Int64ToBytes ¶
Converts an int64 into slice of Bytes.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.