buffer

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBadRead = errors.New("bad read")

Functions

This section is empty.

Types

type Buffer

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

func New

func New(opts ...Option) *Buffer

func (*Buffer) Bytes

func (b *Buffer) Bytes() []byte

func (*Buffer) GetAngle16

func (b *Buffer) GetAngle16() (float32, error)

func (*Buffer) GetAngle8

func (b *Buffer) GetAngle8() (float32, error)

func (*Buffer) GetBytes

func (b *Buffer) GetBytes(n int) ([]byte, error)

func (*Buffer) GetCoord16

func (b *Buffer) GetCoord16() (float32, error)

func (*Buffer) GetCoord32

func (b *Buffer) GetCoord32() (float32, error)

func (*Buffer) GetFloat32

func (b *Buffer) GetFloat32() (float32, error)

func (*Buffer) GetInt16

func (b *Buffer) GetInt16() (int16, error)

func (*Buffer) GetInt32

func (b *Buffer) GetInt32() (int32, error)

func (*Buffer) GetString

func (b *Buffer) GetString() (string, error)

func (*Buffer) GetUint16

func (b *Buffer) GetUint16() (uint16, error)

func (*Buffer) GetUint32

func (b *Buffer) GetUint32() (uint32, error)

func (*Buffer) Len

func (b *Buffer) Len() int

func (*Buffer) Off

func (b *Buffer) Off() int

func (*Buffer) PeekBytes

func (b *Buffer) PeekBytes(n int) ([]byte, error)

func (*Buffer) PeekBytesAt

func (b *Buffer) PeekBytesAt(off, size int) ([]byte, error)

func (*Buffer) PeekInt32

func (b *Buffer) PeekInt32() (int32, error)

func (*Buffer) PutAngle16

func (b *Buffer) PutAngle16(v float32)

func (*Buffer) PutAngle32

func (b *Buffer) PutAngle32(v float32)

func (*Buffer) PutAngle8

func (b *Buffer) PutAngle8(v float32)

func (*Buffer) PutByte

func (b *Buffer) PutByte(v byte)

func (*Buffer) PutBytes

func (b *Buffer) PutBytes(v []byte)

func (*Buffer) PutCoord16

func (b *Buffer) PutCoord16(v float32)

func (*Buffer) PutCoord32

func (b *Buffer) PutCoord32(v float32)

func (*Buffer) PutFloat32

func (b *Buffer) PutFloat32(v float32)

func (*Buffer) PutInt16

func (b *Buffer) PutInt16(v int16)

func (*Buffer) PutInt32

func (b *Buffer) PutInt32(v int32)

func (*Buffer) PutString

func (b *Buffer) PutString(v string)

func (*Buffer) PutUint16

func (b *Buffer) PutUint16(v uint16)

func (*Buffer) PutUint32

func (b *Buffer) PutUint32(v uint32)

func (*Buffer) ReadByte

func (b *Buffer) ReadByte() (byte, error)

func (*Buffer) Seek

func (b *Buffer) Seek(n int) error

func (*Buffer) Skip

func (b *Buffer) Skip(n int) error

type Option

type Option func(*Buffer)

func WithData

func WithData(data []byte) Option

Jump to

Keyboard shortcuts

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