Skip to content

Latest commit

 

History

History
1840 lines (1181 loc) · 31.8 KB

File metadata and controls

1840 lines (1181 loc) · 31.8 KB

Binaryiotools

Gimpformats Index / Gimpformats / Binaryiotools

Auto-generated documentation for gimpformats.binaryiotools module.

IO

Show source in binaryiotools.py:40

Class to handle i/o to a byte buffer or file-like object.

Signature

class IO:
    def __init__(
        self,
        data: bytearray | bytes | None = None,
        idx: int = 0,
        littleEndian: bool = False,
        boolSize: int = 8,
        stringEncoding: str = "U",
    ) -> None: ...

IO().getitem

Show source in binaryiotools.py:72

Get data at a specific idx.

Signature

def __getitem__(self, idx: int): ...

IO().len

Show source in binaryiotools.py:68

Length of data.

Signature

def __len__(self) -> int: ...

IO()._read

Show source in binaryiotools.py:123

General formatted read.

Signature

def _read(self, size: int, fmt: str) -> Any: ...

IO()._readUntil

Show source in binaryiotools.py:757

Read a sequence of chars in a set encoding until a set char.

Arguments

  • until - must be within the ascii character set
  • encoding - one of A (ascii), U (UTF-8) or W (UCS-2)

Signature

def _readUntil(self, until: str, encoding: str = "A") -> str: ...

IO()._sz754

Show source in binaryiotools.py:689

Read the next string conforming to IEEE 754 and advance the index.

Note, string format is: uint32 n+1 Number of bytearray that follow, including the zero byte byte[n] ... String data in Unicode, encoded using UTF-8 byte 0 Zero marks the end of the string. or simply uint32=0 for empty string

Signature

def _sz754(self, encoding: str) -> str: ...

IO()._sz754set

Show source in binaryiotools.py:711

_sz754set.

Signature

def _sz754set(self, sz754: Any, _encoding: str) -> None: ...

IO()._write

Show source in binaryiotools.py:113

General formatted write.

Signature

def _write(self, size: int, fmt: str, data: Any) -> None: ...

IO().addbytearray

Show source in binaryiotools.py:662

Add some raw bytearray and advance the index.

Arguments

  • iobytearray - Can be a string, bytearray, bytes, or another IOBuffer object.

Signature

def addbytearray(self, iobytearray: Any) -> None: ...

IO().beginContext

Show source in binaryiotools.py:102

Start a new context where the index can be changed all you want...

and when endContext() is called, it will be restored to the current position

Signature

def beginContext(self, newIndex: int) -> None: ...

IO().bool16

Show source in binaryiotools.py:176

Get bool16.

Signature

@property
def bool16(self) -> bool: ...

IO().bool16

Show source in binaryiotools.py:181

Set bool16.

Signature

@bool16.setter
def bool16(self, ioBool: bool) -> None: ...

IO().bool32

Show source in binaryiotools.py:186

Get bool32.

Signature

@property
def bool32(self) -> bool: ...

IO().bool32

Show source in binaryiotools.py:191

Set bool32.

Signature

@bool32.setter
def bool32(self, ioBool: bool) -> None: ...

IO().bool64

Show source in binaryiotools.py:196

Get bool64.

Signature

@property
def bool64(self) -> bool: ...

IO().bool64

Show source in binaryiotools.py:201

Set bool64.

Signature

@bool64.setter
def bool64(self, ioBool: bool) -> None: ...

IO().bool8

Show source in binaryiotools.py:166

Get bool8.

Signature

@property
def bool8(self) -> bool: ...

IO().bool8

Show source in binaryiotools.py:171

Set a bool8.

Signature

@bool8.setter
def bool8(self, ioBool: bool) -> None: ...

IO().boolean

Show source in binaryiotools.py:139

Return bool.

Signature

@property
def boolean(self) -> bool: ...

IO().boolean

Show source in binaryiotools.py:152

Set bool.

Signature

@boolean.setter
def boolean(self, ioBool: bool) -> None: ...

IO().byte

Show source in binaryiotools.py:206

Get byte.

Signature

@property
def byte(self) -> Any: ...

IO().byte

Show source in binaryiotools.py:211

Set byte.

Signature

@byte.setter
def byte(self, byte: Any) -> None: ...

IO().cString

Show source in binaryiotools.py:846

Read a sequence of chars until the next null byte.

Signature

@property
def cString(self) -> str: ...

IO().cString

Show source in binaryiotools.py:851

Set a sequence of chars and add a null byte.

Signature

@cString.setter
def cString(self, text: str) -> None: ...

IO().cStringA

Show source in binaryiotools.py:857

Read a sequence of chars until the next null byte in ascii.

Signature

@property
def cStringA(self) -> str: ...

IO().cStringA

Show source in binaryiotools.py:862

Set a sequence of chars and add a null byte in ascii.

Signature

@cStringA.setter
def cStringA(self, text: str) -> None: ...

IO().cStringU

Show source in binaryiotools.py:879

Read a sequence of chars until the next null byte in utf-8.

Signature

@property
def cStringU(self) -> str: ...

IO().cStringU

Show source in binaryiotools.py:884

Set a sequence of chars and add a null byte in utf-8.

Signature

@cStringU.setter
def cStringU(self, text: str) -> None: ...

IO().cStringW

Show source in binaryiotools.py:868

Read a sequence of chars until the next null byte in ucs-2.

Signature

@property
def cStringW(self) -> str: ...

IO().cStringW

Show source in binaryiotools.py:873

Set a sequence of chars and add a null byte in ucs-2.

Signature

@cStringW.setter
def cStringW(self, text: str) -> None: ...

IO().data

Show source in binaryiotools.py:76

Return data as a mutable bytearray.

Signature

@property
def data(self) -> bytearray: ...

IO().data

Show source in binaryiotools.py:85

Set data.

Signature

@data.setter
def data(self, data: bytearray) -> None: ...

IO().double

Show source in binaryiotools.py:606

Get a double.

Signature

@property
def double(self) -> float: ...

IO().double

Show source in binaryiotools.py:611

Set a double.

Signature

@double.setter
def double(self, floating: float) -> None: ...

IO().dword

Show source in binaryiotools.py:246

Get a dword.

Signature

@property
def dword(self) -> Any: ...

IO().dword

Show source in binaryiotools.py:251

Set a dword.

Signature

@dword.setter
def dword(self, dword: Any) -> None: ...

IO().endContext

Show source in binaryiotools.py:109

Restore the index to the previous location where it was when beginContext() was called.

Signature

def endContext(self) -> None: ...

IO().float32

Show source in binaryiotools.py:406

Get a float32.

Signature

@property
def float32(self) -> float: ...

IO().float32

Show source in binaryiotools.py:413

Set a float32.

Signature

@float32.setter
def float32(self, float32: float) -> None: ...

IO().float32be

Show source in binaryiotools.py:616

Read the next 32 bit float and advance the index.

Signature

@property
def float32be(self) -> float: ...

IO().float32be

Show source in binaryiotools.py:621

Set a 32 bit float.

Signature

@float32be.setter
def float32be(self, float32be: float) -> None: ...

IO().float32le

Show source in binaryiotools.py:626

Read the next 32 bit float and advance the index.

Signature

@property
def float32le(self) -> float: ...

IO().float32le

Show source in binaryiotools.py:631

Set a 32 bit float.

Signature

@float32le.setter
def float32le(self, float32le: float) -> None: ...

IO().float64

Show source in binaryiotools.py:421

Get a float64.

Signature

@property
def float64(self) -> float: ...

IO().float64

Show source in binaryiotools.py:428

Set a float64.

Signature

@float64.setter
def float64(self, float64: float) -> None: ...

IO().float64be

Show source in binaryiotools.py:636

Read the next 64 bit float and advance the index.

Signature

@property
def float64be(self) -> float: ...

IO().float64be

Show source in binaryiotools.py:641

Set a 64 bit float.

Signature

@float64be.setter
def float64be(self, float64be: float) -> None: ...

IO().float64le

Show source in binaryiotools.py:646

Read the next 64 bit float and advance the index.

Signature

@property
def float64le(self) -> float: ...

IO().float64le

Show source in binaryiotools.py:651

Set a 64 bit float.

Signature

@float64le.setter
def float64le(self, float64le: float) -> None: ...

IO().floating

Show source in binaryiotools.py:596

Get a float.

Signature

@property
def floating(self) -> float: ...

IO().floating

Show source in binaryiotools.py:601

Set a float.

Signature

@floating.setter
def floating(self, floating: float) -> None: ...

IO().getbytearray

Show source in binaryiotools.py:656

Grab some raw bytearray and advance the index.

Signature

def getbytearray(self, nbytearray: int): ...

IO().i16

Show source in binaryiotools.py:316

Get an int16.

Signature

@property
def i16(self) -> int: ...

IO().i16

Show source in binaryiotools.py:323

Set an int16.

Signature

@i16.setter
def i16(self, i16: int) -> None: ...

IO().i16be

Show source in binaryiotools.py:506

Read the next signed int16 and advance the index.

Signature

@property
def i16be(self) -> int: ...

IO().i16be

Show source in binaryiotools.py:511

Set the int16.

Signature

@i16be.setter
def i16be(self, i16be: int) -> None: ...

IO().i16le

Show source in binaryiotools.py:496

Read the next signed int16 and advance the index.

Signature

@property
def i16le(self) -> int: ...

IO().i16le

Show source in binaryiotools.py:501

Set the int16.

Signature

@i16le.setter
def i16le(self, i16le: int) -> None: ...

IO().i32

Show source in binaryiotools.py:346

Get an int32.

Signature

@property
def i32(self) -> int: ...

IO().i32

Show source in binaryiotools.py:353

Set an int32.

Signature

@i32.setter
def i32(self, i32: int) -> None: ...

IO().i32be

Show source in binaryiotools.py:546

Read the next signed int32 and advance the index.

Signature

@property
def i32be(self) -> int: ...

IO().i32be

Show source in binaryiotools.py:551

Set the int32.

Signature

@i32be.setter
def i32be(self, i32be: int) -> None: ...

IO().i32le

Show source in binaryiotools.py:536

Read the next signed int32 and advance the index.

Signature

@property
def i32le(self) -> int: ...

IO().i32le

Show source in binaryiotools.py:541

Set the int32.

Signature

@i32le.setter
def i32le(self, i32le: int) -> None: ...

IO().i64

Show source in binaryiotools.py:376

Get an int64.

Signature

@property
def i64(self) -> int: ...

IO().i64

Show source in binaryiotools.py:383

Set an int64.

Signature

@i64.setter
def i64(self, i64: int) -> None: ...

IO().i64be

Show source in binaryiotools.py:586

Read the next signed int64 and advance the index.

Signature

@property
def i64be(self) -> int: ...

IO().i64be

Show source in binaryiotools.py:591

Set the int64.

Signature

@i64be.setter
def i64be(self, i64be: int) -> None: ...

IO().i64le

Show source in binaryiotools.py:576

Read the next signed int64 and advance the index.

Signature

@property
def i64le(self) -> int: ...

IO().i64le

Show source in binaryiotools.py:581

Set the int64.

Signature

@i64le.setter
def i64le(self, i64le: int) -> None: ...

IO().i8

Show source in binaryiotools.py:286

Get an int8.

Signature

@property
def i8(self) -> int: ...

IO().i8

Show source in binaryiotools.py:293

Set an int8.

Signature

@i8.setter
def i8(self, i8: int) -> None: ...

IO().i8be

Show source in binaryiotools.py:466

Read the next signed int8 and advance the index.

Signature

@property
def i8be(self) -> int: ...

IO().i8be

Show source in binaryiotools.py:471

Set the int8.

Signature

@i8be.setter
def i8be(self, i8be: int) -> None: ...

IO().i8le

Show source in binaryiotools.py:456

Read the next signed int8 and advance the index.

Signature

@property
def i8le(self) -> int: ...

IO().i8le

Show source in binaryiotools.py:461

Set the int8.

Signature

@i8le.setter
def i8le(self, i8le: int) -> None: ...

IO().index

Show source in binaryiotools.py:92

Return data.

Signature

@property
def index(self) -> int: ...

IO().index

Show source in binaryiotools.py:97

Set index.

Signature

@index.setter
def index(self, index: int) -> None: ...

IO().qword

Show source in binaryiotools.py:266

Get a qword.

Signature

@property
def qword(self) -> Any: ...

IO().qword

Show source in binaryiotools.py:271

Set a qword.

Signature

@qword.setter
def qword(self, qword: Any) -> None: ...

IO().sz754

Show source in binaryiotools.py:717

sz754.

Signature

@property
def sz754(self) -> Any: ...

IO().sz754

Show source in binaryiotools.py:722

Set sz754.

Signature

@sz754.setter
def sz754(self, sz754: Any) -> None: ...

IO().sz754A

Show source in binaryiotools.py:727

sz754A.

Signature

@property
def sz754A(self) -> Any: ...

IO().sz754A

Show source in binaryiotools.py:732

Set sz754A.

Signature

@sz754A.setter
def sz754A(self, sz754: Any) -> None: ...

IO().sz754U

Show source in binaryiotools.py:747

sz754U.

Signature

@property
def sz754U(self) -> Any: ...

IO().sz754U

Show source in binaryiotools.py:752

Set sz754U.

Signature

@sz754U.setter
def sz754U(self, sz754: Any) -> None: ...

IO().sz754W

Show source in binaryiotools.py:737

sz754W.

Signature

@property
def sz754W(self) -> Any: ...

IO().sz754W

Show source in binaryiotools.py:742

Set sz754W.

Signature

@sz754W.setter
def sz754W(self, sz754: Any) -> None: ...

IO().textLine

Show source in binaryiotools.py:786

Read a sequence of chars until the next new line char.

Signature

@property
def textLine(self) -> str: ...

IO().textLine

Show source in binaryiotools.py:794

Set a sequence of chars until the next new line char.

Signature

@textLine.setter
def textLine(self, text: str) -> None: ...

IO().textLineA

Show source in binaryiotools.py:801

Read a sequence of chars until the next new line char in ascii.

Signature

@property
def textLineA(self) -> str: ...

IO().textLineA

Show source in binaryiotools.py:809

Set a sequence of chars until the next new line char in ascii.

Signature

@textLineA.setter
def textLineA(self, text: str) -> None: ...

IO().textLineU

Show source in binaryiotools.py:831

Read a sequence of chars until the next new line char in utf-8.

Signature

@property
def textLineU(self) -> str: ...

IO().textLineU

Show source in binaryiotools.py:839

Set a sequence of chars until the next new line char in utf-8.

Signature

@textLineU.setter
def textLineU(self, text: str) -> None: ...

IO().textLineW

Show source in binaryiotools.py:816

Read a sequence of chars until the next new line char in ucs-2.

Signature

@property
def textLineW(self) -> str: ...

IO().textLineW

Show source in binaryiotools.py:824

Set a sequence of chars until the next new line char in ucs-2.

Signature

@textLineW.setter
def textLineW(self, text: str) -> None: ...

IO().u16

Show source in binaryiotools.py:331

Get an uint16.

Signature

@property
def u16(self) -> int: ...

IO().u16

Show source in binaryiotools.py:338

Set an unint16.

Signature

@u16.setter
def u16(self, u16: int) -> None: ...

IO().u16be

Show source in binaryiotools.py:476

Read the next uint16 and advance the index.

Signature

@property
def u16be(self) -> int: ...

IO().u16be

Show source in binaryiotools.py:481

Set the uint16.

Signature

@u16be.setter
def u16be(self, u16be: int) -> None: ...

IO().u16le

Show source in binaryiotools.py:486

Read the next uint16 and advance the index.

Signature

@property
def u16le(self) -> int: ...

IO().u16le

Show source in binaryiotools.py:491

Set the uint16.

Signature

@u16le.setter
def u16le(self, u16le: int) -> None: ...

IO().u32

Show source in binaryiotools.py:361

Get a uint32.

Signature

@property
def u32(self) -> int: ...

IO().u32

Show source in binaryiotools.py:368

Set a unint32.

Signature

@u32.setter
def u32(self, u32: int) -> None: ...

IO().u32be

Show source in binaryiotools.py:516

Read the next uint32 and advance the index.

Signature

@property
def u32be(self) -> int: ...

IO().u32be

Show source in binaryiotools.py:521

Set the uint32.

Signature

@u32be.setter
def u32be(self, u32be: int) -> None: ...

IO().u32le

Show source in binaryiotools.py:526

Read the next uint32 and advance the index.

Signature

@property
def u32le(self) -> int: ...

IO().u32le

Show source in binaryiotools.py:531

Set the uint32.

Signature

@u32le.setter
def u32le(self, u32le: int) -> None: ...

IO().u64

Show source in binaryiotools.py:391

Get a uint64.

Signature

@property
def u64(self) -> int: ...

IO().u64

Show source in binaryiotools.py:398

Set a uint64.

Signature

@u64.setter
def u64(self, u64: int) -> None: ...

IO().u64be

Show source in binaryiotools.py:556

Read the next uint64 and advance the index.

Signature

@property
def u64be(self) -> int: ...

IO().u64be

Show source in binaryiotools.py:561

Set the uint64.

Signature

@u64be.setter
def u64be(self, u64be: int) -> None: ...

IO().u64le

Show source in binaryiotools.py:566

Read the next uint64 and advance the index.

Signature

@property
def u64le(self) -> int: ...

IO().u64le

Show source in binaryiotools.py:571

Set the uint64.

Signature

@u64le.setter
def u64le(self, u64le: int) -> None: ...

IO().u8

Show source in binaryiotools.py:301

Get an unsigned int.

Signature

@property
def u8(self) -> int: ...

IO().u8

Show source in binaryiotools.py:308

Set an unsigned int.

Signature

@u8.setter
def u8(self, u8: int) -> None: ...

IO().u8be

Show source in binaryiotools.py:436

Read the next uint8 and advance the index.

Signature

@property
def u8be(self) -> int: ...

IO().u8be

Show source in binaryiotools.py:441

Set the uint8.

Signature

@u8be.setter
def u8be(self, u8be: int) -> None: ...

IO().u8le

Show source in binaryiotools.py:446

Read the next uint8 and advance the index.

Signature

@property
def u8le(self) -> int: ...

IO().u8le

Show source in binaryiotools.py:451

Set the uint8.

Signature

@u8le.setter
def u8le(self, u8le: int) -> None: ...

IO().unsignedByte

Show source in binaryiotools.py:216

Get unsigned byte.

Signature

@property
def unsignedByte(self) -> Any: ...

IO().unsignedByte

Show source in binaryiotools.py:221

Set unsigned byte.

Signature

@unsignedByte.setter
def unsignedByte(self, byte: Any) -> None: ...

IO().unsignedDword

Show source in binaryiotools.py:256

Get a unsigned dword.

Signature

@property
def unsignedDword(self) -> Any: ...

IO().unsignedDword

Show source in binaryiotools.py:261

Set an unsigned dword.

Signature

@unsignedDword.setter
def unsignedDword(self, unsignedDword: Any) -> None: ...

IO().unsignedQword

Show source in binaryiotools.py:276

Get an unsigned qword.

Signature

@property
def unsignedQword(self) -> Any: ...

IO().unsignedQword

Show source in binaryiotools.py:281

Set an unsigned qword.

Signature

@unsignedQword.setter
def unsignedQword(self, unsignedQword: Any) -> None: ...

IO().unsignedWord

Show source in binaryiotools.py:236

Get an unsigned word.

Signature

@property
def unsignedWord(self) -> Any: ...

IO().unsignedWord

Show source in binaryiotools.py:241

Set an unsigned word.

Signature

@unsignedWord.setter
def unsignedWord(self, unsignedWord: Any) -> None: ...

IO().word

Show source in binaryiotools.py:226

Get a word.

Signature

@property
def word(self) -> Any: ...

IO().word

Show source in binaryiotools.py:231

Set a word.

Signature

@word.setter
def word(self, word: Any) -> None: ...