Gimpformats Index / Gimpformats / Binaryiotools
Auto-generated documentation for gimpformats.binaryiotools module.
- Binaryiotools
- IO
- IO().getitem
- IO().len
- IO()._read
- IO()._readUntil
- IO()._sz754
- IO()._sz754set
- IO()._write
- IO().addbytearray
- IO().beginContext
- IO().bool16
- IO().bool16
- IO().bool32
- IO().bool32
- IO().bool64
- IO().bool64
- IO().bool8
- IO().bool8
- IO().boolean
- IO().boolean
- IO().byte
- IO().byte
- IO().cString
- IO().cString
- IO().cStringA
- IO().cStringA
- IO().cStringU
- IO().cStringU
- IO().cStringW
- IO().cStringW
- IO().data
- IO().data
- IO().double
- IO().double
- IO().dword
- IO().dword
- IO().endContext
- IO().float32
- IO().float32
- IO().float32be
- IO().float32be
- IO().float32le
- IO().float32le
- IO().float64
- IO().float64
- IO().float64be
- IO().float64be
- IO().float64le
- IO().float64le
- IO().floating
- IO().floating
- IO().getbytearray
- IO().i16
- IO().i16
- IO().i16be
- IO().i16be
- IO().i16le
- IO().i16le
- IO().i32
- IO().i32
- IO().i32be
- IO().i32be
- IO().i32le
- IO().i32le
- IO().i64
- IO().i64
- IO().i64be
- IO().i64be
- IO().i64le
- IO().i64le
- IO().i8
- IO().i8
- IO().i8be
- IO().i8be
- IO().i8le
- IO().i8le
- IO().index
- IO().index
- IO().qword
- IO().qword
- IO().sz754
- IO().sz754
- IO().sz754A
- IO().sz754A
- IO().sz754U
- IO().sz754U
- IO().sz754W
- IO().sz754W
- IO().textLine
- IO().textLine
- IO().textLineA
- IO().textLineA
- IO().textLineU
- IO().textLineU
- IO().textLineW
- IO().textLineW
- IO().u16
- IO().u16
- IO().u16be
- IO().u16be
- IO().u16le
- IO().u16le
- IO().u32
- IO().u32
- IO().u32be
- IO().u32be
- IO().u32le
- IO().u32le
- IO().u64
- IO().u64
- IO().u64be
- IO().u64be
- IO().u64le
- IO().u64le
- IO().u8
- IO().u8
- IO().u8be
- IO().u8be
- IO().u8le
- IO().u8le
- IO().unsignedByte
- IO().unsignedByte
- IO().unsignedDword
- IO().unsignedDword
- IO().unsignedQword
- IO().unsignedQword
- IO().unsignedWord
- IO().unsignedWord
- IO().word
- IO().word
- IO
Show source in binaryiotools.py:40
Class to handle i/o to a byte buffer or file-like object.
class IO:
def __init__(
self,
data: bytearray | bytes | None = None,
idx: int = 0,
littleEndian: bool = False,
boolSize: int = 8,
stringEncoding: str = "U",
) -> None: ...Show source in binaryiotools.py:72
Get data at a specific idx.
def __getitem__(self, idx: int): ...Show source in binaryiotools.py:68
Length of data.
def __len__(self) -> int: ...Show source in binaryiotools.py:123
General formatted read.
def _read(self, size: int, fmt: str) -> Any: ...Show source in binaryiotools.py:757
Read a sequence of chars in a set encoding until a set char.
until- must be within the ascii character setencoding- one of A (ascii), U (UTF-8) or W (UCS-2)
def _readUntil(self, until: str, encoding: str = "A") -> str: ...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
def _sz754(self, encoding: str) -> str: ...Show source in binaryiotools.py:711
_sz754set.
def _sz754set(self, sz754: Any, _encoding: str) -> None: ...Show source in binaryiotools.py:113
General formatted write.
def _write(self, size: int, fmt: str, data: Any) -> None: ...Show source in binaryiotools.py:662
Add some raw bytearray and advance the index.
iobytearray- Can be a string, bytearray, bytes, or another IOBuffer object.
def addbytearray(self, iobytearray: Any) -> None: ...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
def beginContext(self, newIndex: int) -> None: ...Show source in binaryiotools.py:176
Get bool16.
@property
def bool16(self) -> bool: ...Show source in binaryiotools.py:181
Set bool16.
@bool16.setter
def bool16(self, ioBool: bool) -> None: ...Show source in binaryiotools.py:186
Get bool32.
@property
def bool32(self) -> bool: ...Show source in binaryiotools.py:191
Set bool32.
@bool32.setter
def bool32(self, ioBool: bool) -> None: ...Show source in binaryiotools.py:196
Get bool64.
@property
def bool64(self) -> bool: ...Show source in binaryiotools.py:201
Set bool64.
@bool64.setter
def bool64(self, ioBool: bool) -> None: ...Show source in binaryiotools.py:166
Get bool8.
@property
def bool8(self) -> bool: ...Show source in binaryiotools.py:171
Set a bool8.
@bool8.setter
def bool8(self, ioBool: bool) -> None: ...Show source in binaryiotools.py:139
Return bool.
@property
def boolean(self) -> bool: ...Show source in binaryiotools.py:152
Set bool.
@boolean.setter
def boolean(self, ioBool: bool) -> None: ...Show source in binaryiotools.py:206
Get byte.
@property
def byte(self) -> Any: ...Show source in binaryiotools.py:211
Set byte.
@byte.setter
def byte(self, byte: Any) -> None: ...Show source in binaryiotools.py:846
Read a sequence of chars until the next null byte.
@property
def cString(self) -> str: ...Show source in binaryiotools.py:851
Set a sequence of chars and add a null byte.
@cString.setter
def cString(self, text: str) -> None: ...Show source in binaryiotools.py:857
Read a sequence of chars until the next null byte in ascii.
@property
def cStringA(self) -> str: ...Show source in binaryiotools.py:862
Set a sequence of chars and add a null byte in ascii.
@cStringA.setter
def cStringA(self, text: str) -> None: ...Show source in binaryiotools.py:879
Read a sequence of chars until the next null byte in utf-8.
@property
def cStringU(self) -> str: ...Show source in binaryiotools.py:884
Set a sequence of chars and add a null byte in utf-8.
@cStringU.setter
def cStringU(self, text: str) -> None: ...Show source in binaryiotools.py:868
Read a sequence of chars until the next null byte in ucs-2.
@property
def cStringW(self) -> str: ...Show source in binaryiotools.py:873
Set a sequence of chars and add a null byte in ucs-2.
@cStringW.setter
def cStringW(self, text: str) -> None: ...Show source in binaryiotools.py:76
Return data as a mutable bytearray.
@property
def data(self) -> bytearray: ...Show source in binaryiotools.py:85
Set data.
@data.setter
def data(self, data: bytearray) -> None: ...Show source in binaryiotools.py:606
Get a double.
@property
def double(self) -> float: ...Show source in binaryiotools.py:611
Set a double.
@double.setter
def double(self, floating: float) -> None: ...Show source in binaryiotools.py:246
Get a dword.
@property
def dword(self) -> Any: ...Show source in binaryiotools.py:251
Set a dword.
@dword.setter
def dword(self, dword: Any) -> None: ...Show source in binaryiotools.py:109
Restore the index to the previous location where it was when beginContext() was called.
def endContext(self) -> None: ...Show source in binaryiotools.py:406
Get a float32.
@property
def float32(self) -> float: ...Show source in binaryiotools.py:413
Set a float32.
@float32.setter
def float32(self, float32: float) -> None: ...Show source in binaryiotools.py:616
Read the next 32 bit float and advance the index.
@property
def float32be(self) -> float: ...Show source in binaryiotools.py:621
Set a 32 bit float.
@float32be.setter
def float32be(self, float32be: float) -> None: ...Show source in binaryiotools.py:626
Read the next 32 bit float and advance the index.
@property
def float32le(self) -> float: ...Show source in binaryiotools.py:631
Set a 32 bit float.
@float32le.setter
def float32le(self, float32le: float) -> None: ...Show source in binaryiotools.py:421
Get a float64.
@property
def float64(self) -> float: ...Show source in binaryiotools.py:428
Set a float64.
@float64.setter
def float64(self, float64: float) -> None: ...Show source in binaryiotools.py:636
Read the next 64 bit float and advance the index.
@property
def float64be(self) -> float: ...Show source in binaryiotools.py:641
Set a 64 bit float.
@float64be.setter
def float64be(self, float64be: float) -> None: ...Show source in binaryiotools.py:646
Read the next 64 bit float and advance the index.
@property
def float64le(self) -> float: ...Show source in binaryiotools.py:651
Set a 64 bit float.
@float64le.setter
def float64le(self, float64le: float) -> None: ...Show source in binaryiotools.py:596
Get a float.
@property
def floating(self) -> float: ...Show source in binaryiotools.py:601
Set a float.
@floating.setter
def floating(self, floating: float) -> None: ...Show source in binaryiotools.py:656
Grab some raw bytearray and advance the index.
def getbytearray(self, nbytearray: int): ...Show source in binaryiotools.py:316
Get an int16.
@property
def i16(self) -> int: ...Show source in binaryiotools.py:323
Set an int16.
@i16.setter
def i16(self, i16: int) -> None: ...Show source in binaryiotools.py:506
Read the next signed int16 and advance the index.
@property
def i16be(self) -> int: ...Show source in binaryiotools.py:511
Set the int16.
@i16be.setter
def i16be(self, i16be: int) -> None: ...Show source in binaryiotools.py:496
Read the next signed int16 and advance the index.
@property
def i16le(self) -> int: ...Show source in binaryiotools.py:501
Set the int16.
@i16le.setter
def i16le(self, i16le: int) -> None: ...Show source in binaryiotools.py:346
Get an int32.
@property
def i32(self) -> int: ...Show source in binaryiotools.py:353
Set an int32.
@i32.setter
def i32(self, i32: int) -> None: ...Show source in binaryiotools.py:546
Read the next signed int32 and advance the index.
@property
def i32be(self) -> int: ...Show source in binaryiotools.py:551
Set the int32.
@i32be.setter
def i32be(self, i32be: int) -> None: ...Show source in binaryiotools.py:536
Read the next signed int32 and advance the index.
@property
def i32le(self) -> int: ...Show source in binaryiotools.py:541
Set the int32.
@i32le.setter
def i32le(self, i32le: int) -> None: ...Show source in binaryiotools.py:376
Get an int64.
@property
def i64(self) -> int: ...Show source in binaryiotools.py:383
Set an int64.
@i64.setter
def i64(self, i64: int) -> None: ...Show source in binaryiotools.py:586
Read the next signed int64 and advance the index.
@property
def i64be(self) -> int: ...Show source in binaryiotools.py:591
Set the int64.
@i64be.setter
def i64be(self, i64be: int) -> None: ...Show source in binaryiotools.py:576
Read the next signed int64 and advance the index.
@property
def i64le(self) -> int: ...Show source in binaryiotools.py:581
Set the int64.
@i64le.setter
def i64le(self, i64le: int) -> None: ...Show source in binaryiotools.py:286
Get an int8.
@property
def i8(self) -> int: ...Show source in binaryiotools.py:293
Set an int8.
@i8.setter
def i8(self, i8: int) -> None: ...Show source in binaryiotools.py:466
Read the next signed int8 and advance the index.
@property
def i8be(self) -> int: ...Show source in binaryiotools.py:471
Set the int8.
@i8be.setter
def i8be(self, i8be: int) -> None: ...Show source in binaryiotools.py:456
Read the next signed int8 and advance the index.
@property
def i8le(self) -> int: ...Show source in binaryiotools.py:461
Set the int8.
@i8le.setter
def i8le(self, i8le: int) -> None: ...Show source in binaryiotools.py:92
Return data.
@property
def index(self) -> int: ...Show source in binaryiotools.py:97
Set index.
@index.setter
def index(self, index: int) -> None: ...Show source in binaryiotools.py:266
Get a qword.
@property
def qword(self) -> Any: ...Show source in binaryiotools.py:271
Set a qword.
@qword.setter
def qword(self, qword: Any) -> None: ...Show source in binaryiotools.py:717
sz754.
@property
def sz754(self) -> Any: ...Show source in binaryiotools.py:722
Set sz754.
@sz754.setter
def sz754(self, sz754: Any) -> None: ...Show source in binaryiotools.py:727
sz754A.
@property
def sz754A(self) -> Any: ...Show source in binaryiotools.py:732
Set sz754A.
@sz754A.setter
def sz754A(self, sz754: Any) -> None: ...Show source in binaryiotools.py:747
sz754U.
@property
def sz754U(self) -> Any: ...Show source in binaryiotools.py:752
Set sz754U.
@sz754U.setter
def sz754U(self, sz754: Any) -> None: ...Show source in binaryiotools.py:737
sz754W.
@property
def sz754W(self) -> Any: ...Show source in binaryiotools.py:742
Set sz754W.
@sz754W.setter
def sz754W(self, sz754: Any) -> None: ...Show source in binaryiotools.py:786
Read a sequence of chars until the next new line char.
@property
def textLine(self) -> str: ...Show source in binaryiotools.py:794
Set a sequence of chars until the next new line char.
@textLine.setter
def textLine(self, text: str) -> None: ...Show source in binaryiotools.py:801
Read a sequence of chars until the next new line char in ascii.
@property
def textLineA(self) -> str: ...Show source in binaryiotools.py:809
Set a sequence of chars until the next new line char in ascii.
@textLineA.setter
def textLineA(self, text: str) -> None: ...Show source in binaryiotools.py:831
Read a sequence of chars until the next new line char in utf-8.
@property
def textLineU(self) -> str: ...Show source in binaryiotools.py:839
Set a sequence of chars until the next new line char in utf-8.
@textLineU.setter
def textLineU(self, text: str) -> None: ...Show source in binaryiotools.py:816
Read a sequence of chars until the next new line char in ucs-2.
@property
def textLineW(self) -> str: ...Show source in binaryiotools.py:824
Set a sequence of chars until the next new line char in ucs-2.
@textLineW.setter
def textLineW(self, text: str) -> None: ...Show source in binaryiotools.py:331
Get an uint16.
@property
def u16(self) -> int: ...Show source in binaryiotools.py:338
Set an unint16.
@u16.setter
def u16(self, u16: int) -> None: ...Show source in binaryiotools.py:476
Read the next uint16 and advance the index.
@property
def u16be(self) -> int: ...Show source in binaryiotools.py:481
Set the uint16.
@u16be.setter
def u16be(self, u16be: int) -> None: ...Show source in binaryiotools.py:486
Read the next uint16 and advance the index.
@property
def u16le(self) -> int: ...Show source in binaryiotools.py:491
Set the uint16.
@u16le.setter
def u16le(self, u16le: int) -> None: ...Show source in binaryiotools.py:361
Get a uint32.
@property
def u32(self) -> int: ...Show source in binaryiotools.py:368
Set a unint32.
@u32.setter
def u32(self, u32: int) -> None: ...Show source in binaryiotools.py:516
Read the next uint32 and advance the index.
@property
def u32be(self) -> int: ...Show source in binaryiotools.py:521
Set the uint32.
@u32be.setter
def u32be(self, u32be: int) -> None: ...Show source in binaryiotools.py:526
Read the next uint32 and advance the index.
@property
def u32le(self) -> int: ...Show source in binaryiotools.py:531
Set the uint32.
@u32le.setter
def u32le(self, u32le: int) -> None: ...Show source in binaryiotools.py:391
Get a uint64.
@property
def u64(self) -> int: ...Show source in binaryiotools.py:398
Set a uint64.
@u64.setter
def u64(self, u64: int) -> None: ...Show source in binaryiotools.py:556
Read the next uint64 and advance the index.
@property
def u64be(self) -> int: ...Show source in binaryiotools.py:561
Set the uint64.
@u64be.setter
def u64be(self, u64be: int) -> None: ...Show source in binaryiotools.py:566
Read the next uint64 and advance the index.
@property
def u64le(self) -> int: ...Show source in binaryiotools.py:571
Set the uint64.
@u64le.setter
def u64le(self, u64le: int) -> None: ...Show source in binaryiotools.py:301
Get an unsigned int.
@property
def u8(self) -> int: ...Show source in binaryiotools.py:308
Set an unsigned int.
@u8.setter
def u8(self, u8: int) -> None: ...Show source in binaryiotools.py:436
Read the next uint8 and advance the index.
@property
def u8be(self) -> int: ...Show source in binaryiotools.py:441
Set the uint8.
@u8be.setter
def u8be(self, u8be: int) -> None: ...Show source in binaryiotools.py:446
Read the next uint8 and advance the index.
@property
def u8le(self) -> int: ...Show source in binaryiotools.py:451
Set the uint8.
@u8le.setter
def u8le(self, u8le: int) -> None: ...Show source in binaryiotools.py:216
Get unsigned byte.
@property
def unsignedByte(self) -> Any: ...Show source in binaryiotools.py:221
Set unsigned byte.
@unsignedByte.setter
def unsignedByte(self, byte: Any) -> None: ...Show source in binaryiotools.py:256
Get a unsigned dword.
@property
def unsignedDword(self) -> Any: ...Show source in binaryiotools.py:261
Set an unsigned dword.
@unsignedDword.setter
def unsignedDword(self, unsignedDword: Any) -> None: ...Show source in binaryiotools.py:276
Get an unsigned qword.
@property
def unsignedQword(self) -> Any: ...Show source in binaryiotools.py:281
Set an unsigned qword.
@unsignedQword.setter
def unsignedQword(self, unsignedQword: Any) -> None: ...Show source in binaryiotools.py:236
Get an unsigned word.
@property
def unsignedWord(self) -> Any: ...Show source in binaryiotools.py:241
Set an unsigned word.
@unsignedWord.setter
def unsignedWord(self, unsignedWord: Any) -> None: ...Show source in binaryiotools.py:226
Get a word.
@property
def word(self) -> Any: ...Show source in binaryiotools.py:231
Set a word.
@word.setter
def word(self, word: Any) -> None: ...