buffer

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SizeOfInt32 = uintptr(4)
	SizeOfInt64 = uintptr(8)
)

Variables

View Source
var Arch32Bits bool
View Source
var Arch64Bits bool
View Source
var SizeOfInt uintptr

Functions

func BytesToFloat32 added in v1.0.2

func BytesToFloat32(buf []byte, offset int) float32

func BytesToFloat64 added in v1.0.2

func BytesToFloat64(buf []byte, offset int) float64

func BytesToHexString

func BytesToHexString(buf []byte) string

Coverts a byte slice into a hex string

func BytesToInt16

func BytesToInt16(buf []byte, offset int) int16

Converts

func BytesToInt32

func BytesToInt32(buf []byte, offset int) int32

Covertes a slice into int32; only maximum of 4 bytes will be used

func BytesToInt64

func BytesToInt64(buf []byte, offset int) int64

Covertes a slice into int64; only maximum of 8 bytes will be used

func BytesToNumber

func BytesToNumber(buf []byte, offset, length int) interface{}

converts a slice of bytes into an interger with appropriate type

func BytesToUint16 added in v1.6.3

func BytesToUint16(buf []byte, offset int) uint16

func BytesToUint32 added in v1.6.3

func BytesToUint32(buf []byte, offset int) uint32

Covertes a slice into int32; only maximum of 4 bytes will be used

func Float32ToBytes added in v1.0.2

func Float32ToBytes(float float32, buffer []byte, offset int) []byte

func Float64ToBytes added in v1.0.2

func Float64ToBytes(float float64, buffer []byte, offset int) []byte

func GetUnsigned

func GetUnsigned(b byte) int

func Int16ToBytes

func Int16ToBytes(num int16, buffer []byte, offset int) []byte

converts a

func Int32ToBytes

func Int32ToBytes(num int32, buffer []byte, offset int) []byte

Converts an int32 to a byte slice of size 4

func Int64ToBytes

func Int64ToBytes(num int64, buffer []byte, offset int) []byte

Converts an int64 into slice of Bytes.

func LittleBytesToInt32 added in v1.0.2

func LittleBytesToInt32(buf []byte, offset int) int32

Covertes a slice into int32; only maximum of 4 bytes will be used

func Uint32ToBytes added in v1.8.0

func Uint32ToBytes(num uint32, buffer []byte, offset int) []byte

Converts an int32 to a byte slice of size 4

func VarBytesToInt64 added in v1.0.1

func VarBytesToInt64(buf []byte, offset int, len int) int64

Types

This section is empty.

Jump to

Keyboard shortcuts

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