util

package
v0.0.0-...-5976db4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2017 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Abs

func Abs(x int) int

func AdjustAlign2

func AdjustAlign2(offset int) int

func BytePascalString

func BytePascalString(str string) ([]byte, int, error)

func ByteString

func ByteString(str string) []byte

func ByteUint16

func ByteUint16(n int) []byte

func ByteUint32

func ByteUint32(n int) []byte

func GetSize

func GetSize(isPSB bool) int

func PascalString

func PascalString(buf []byte, offset int) (string, int)

func ReadClassID

func ReadClassID(buf []byte) (string, int)

func ReadFloat32

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

func ReadFloat64

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

func ReadInt16

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

func ReadInt32

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

func ReadInt64

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

func ReadString

func ReadString(buf []byte, offset int, limit int) string

func ReadUint16

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

func ReadUint32

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

func ReadUint64

func ReadUint64(buf []byte, offset int) uint64

func ReadUint8

func ReadUint8(buf []byte, offset int) uint8

func UnicodeString

func UnicodeString(buf []byte) (string, int)

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

func NewReader

func NewReader(b []byte) *Reader

func (*Reader) ReadBoolean

func (r *Reader) ReadBoolean() (bool, error)

func (*Reader) ReadByte

func (r *Reader) ReadByte() (byte, error)

func (*Reader) ReadBytes

func (r *Reader) ReadBytes(num interface{}) ([]byte, error)

func (*Reader) ReadDynamicString

func (r *Reader) ReadDynamicString() (string, error)

func (*Reader) ReadFloat32

func (r *Reader) ReadFloat32() (float32, error)

func (*Reader) ReadFloat64

func (r *Reader) ReadFloat64() (float64, error)

func (*Reader) ReadInt

func (r *Reader) ReadInt() (int, error)

func (*Reader) ReadInt16

func (r *Reader) ReadInt16() (int16, error)

func (*Reader) ReadInt24

func (r *Reader) ReadInt24() (int, error)

func (*Reader) ReadInt32

func (r *Reader) ReadInt32() (int32, error)

func (*Reader) ReadInt64

func (r *Reader) ReadInt64() (int64, error)

func (*Reader) ReadInt8

func (r *Reader) ReadInt8() (int8, error)

func (*Reader) ReadPascalString

func (r *Reader) ReadPascalString() (string, error)

func (*Reader) ReadPathNumber

func (r *Reader) ReadPathNumber() (float64, error)

func (*Reader) ReadString

func (r *Reader) ReadString(n int) (string, error)

func (*Reader) ReadUInt16

func (r *Reader) ReadUInt16() (uint16, error)

func (*Reader) ReadUInt32

func (r *Reader) ReadUInt32() (uint32, error)

func (*Reader) ReadUInt64

func (r *Reader) ReadUInt64() (uint64, error)

func (*Reader) ReadUInt8

func (r *Reader) ReadUInt8() (uint8, error)

func (*Reader) ReadUnicodeString

func (r *Reader) ReadUnicodeString() (string, error)

func (*Reader) ReadUnicodeStringLen

func (r *Reader) ReadUnicodeStringLen(num int) (string, error)

func (*Reader) Skip

func (r *Reader) Skip(n interface{}) error

Jump to

Keyboard shortcuts

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