binaryreader

package
v0.0.0-...-8e7494b Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssertionError

type AssertionError struct {
	Expected any
	Actual   any
}

func NewAssertionError

func NewAssertionError(expected, actual any) *AssertionError

func (*AssertionError) Error

func (e *AssertionError) Error() string

type Reader

type Reader struct {
	ByteOrder binary.ByteOrder
	// contains filtered or unexported fields
}

func NewReader

func NewReader(src io.ReadSeeker, byteOrder binary.ByteOrder) *Reader

func (*Reader) AssertAscii

func (r *Reader) AssertAscii(expected string) error

func (*Reader) AssertByte

func (r *Reader) AssertByte(expected byte) error

func (*Reader) AssertInt16

func (r *Reader) AssertInt16(expected int16) error

func (*Reader) AssertInt32

func (r *Reader) AssertInt32(expected int32) error

func (*Reader) AssertInt64

func (r *Reader) AssertInt64(expected int64) error

func (*Reader) AssertUInt16

func (r *Reader) AssertUInt16(expected uint16) error

func (*Reader) AssertUInt32

func (r *Reader) AssertUInt32(expected uint32) error

func (*Reader) AssertUInt64

func (r *Reader) AssertUInt64(expected uint64) error

func (*Reader) PopPosition

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

func (*Reader) PushPosition

func (r *Reader) PushPosition(offset int64, whence int) (int64, error)

func (*Reader) Read

func (r *Reader) Read(p []byte) (n int, err error)

func (*Reader) ReadAscii

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

func (*Reader) ReadBool

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

func (*Reader) ReadByte

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

func (*Reader) ReadBytes

func (r *Reader) ReadBytes(n int) ([]byte, error)

func (*Reader) ReadFloat32

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

func (*Reader) ReadFloat64

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

func (*Reader) ReadInt8

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

func (*Reader) ReadInt16

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

func (*Reader) ReadInt32

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

func (*Reader) ReadInt64

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

func (*Reader) ReadNullAscii

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

func (*Reader) ReadNullAsciiFrom

func (r *Reader) ReadNullAsciiFrom(offset int64) (string, error)

func (*Reader) ReadNullJIS

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

Read null terminated ShiftJIS string

func (*Reader) ReadNullJISFrom

func (r *Reader) ReadNullJISFrom(offset int64) (string, error)

Read null terminated ShiftJIS string from a given offset, and return to the original position

func (*Reader) ReadNullUTF16

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

Read null terminated UTF16 string

func (*Reader) ReadNullUTF16From

func (r *Reader) ReadNullUTF16From(offset int64) (string, error)

Read null terminated UTF16 string from a given offset, and return to the original position

func (*Reader) ReadUInt8

func (r *Reader) ReadUInt8() (uint8, 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) ReadfixStr

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

read a null-terminated Shift JIS string of fixed length

func (*Reader) Seek

func (r *Reader) Seek(offset int64, whence int) (int64, error)

func (*Reader) WithByteOrder

func (r *Reader) WithByteOrder(order binary.ByteOrder) *Reader

Jump to

Keyboard shortcuts

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