bytearray

package module
v0.0.0-...-7bb2bef Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

README

ByteArray

GoDoc

Documentation

Index

Constants

View Source
const (
	CompressAlgorithmZLIB compressAlgorithm = iota
	CompressAlgorithmDeflate
)

Variables

View Source
var (
	ErrOutOfBounds   = errors.New("out of bounds")
	ErrMalformedData = errors.New("malformed data")
)

Functions

This section is empty.

Types

type ByteArray

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

func New

func New(b ...byte) *ByteArray

func (*ByteArray) Buffer

func (ba *ByteArray) Buffer() *bytes.Buffer

func (*ByteArray) Bytes

func (ba *ByteArray) Bytes() []byte

func (*ByteArray) Clear

func (ba *ByteArray) Clear()

func (*ByteArray) Compress

func (ba *ByteArray) Compress(algorithm compressAlgorithm) (err error)

func (*ByteArray) Decompress

func (ba *ByteArray) Decompress(algorithm compressAlgorithm) (err error)

func (*ByteArray) Read

func (ba *ByteArray) Read(amount uint32) ([]byte, error)

func (*ByteArray) ReadBool

func (ba *ByteArray) ReadBool() (bool, error)

func (*ByteArray) ReadByte

func (ba *ByteArray) ReadByte() (byte, error)

Same as ReadUint8

func (*ByteArray) ReadInt

func (ba *ByteArray) ReadInt() (int, error)

Same as ReadUint32

func (*ByteArray) ReadInt16

func (ba *ByteArray) ReadInt16() (int16, error)

func (*ByteArray) ReadInt32

func (ba *ByteArray) ReadInt32() (int32, error)

func (*ByteArray) ReadInt8

func (ba *ByteArray) ReadInt8() (int8, error)

func (*ByteArray) ReadShort

func (ba *ByteArray) ReadShort() (uint16, error)

Same as ReadUint16

func (*ByteArray) ReadString

func (ba *ByteArray) ReadString() string

func (*ByteArray) ReadUTF

func (ba *ByteArray) ReadUTF() (string, error)

func (*ByteArray) ReadUint16

func (ba *ByteArray) ReadUint16() (uint16, error)

func (*ByteArray) ReadUint32

func (ba *ByteArray) ReadUint32() (uint32, error)

func (*ByteArray) ReadUint8

func (ba *ByteArray) ReadUint8() (byte, error)

func (*ByteArray) Size

func (ba *ByteArray) Size() uint32

func (*ByteArray) Skip

func (ba *ByteArray) Skip(n int) error

func (*ByteArray) Write

func (ba *ByteArray) Write(bb []byte)

func (*ByteArray) WriteBool

func (ba *ByteArray) WriteBool(is bool)

func (*ByteArray) WriteByte

func (ba *ByteArray) WriteByte(b byte)

Same as WriteUint8

func (*ByteArray) WriteHex

func (ba *ByteArray) WriteHex(s string) error

func (*ByteArray) WriteInt

func (ba *ByteArray) WriteInt(i int)

func (*ByteArray) WriteInt16

func (ba *ByteArray) WriteInt16(i int16)

func (*ByteArray) WriteInt32

func (ba *ByteArray) WriteInt32(i int32)

func (*ByteArray) WriteInt8

func (ba *ByteArray) WriteInt8(b int8)

func (*ByteArray) WriteShort

func (ba *ByteArray) WriteShort(i uint16)

Same as WriteUint16

func (*ByteArray) WriteString

func (ba *ByteArray) WriteString(s string)

func (*ByteArray) WriteUTF

func (ba *ByteArray) WriteUTF(s string)

func (*ByteArray) WriteUint16

func (ba *ByteArray) WriteUint16(i uint16)

func (*ByteArray) WriteUint32

func (ba *ByteArray) WriteUint32(i uint32)

func (*ByteArray) WriteUint8

func (ba *ByteArray) WriteUint8(b byte)

Jump to

Keyboard shortcuts

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