Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Latest commit

 

History

History
1914 lines (1272 loc) · 29.5 KB

File metadata and controls

1914 lines (1272 loc) · 29.5 KB

Binaryiotools

Binaryiotools Index / Binaryiotools

Auto-generated documentation for binaryiotools module.

IO

Show source in init.py:36

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",
    ):
        ...

IO().getitem

Show source in init.py:68

Get data at a specific idx.

Signature

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

IO().len

Show source in init.py:64

Length of data.

Signature

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

IO().addBytes

Show source in init.py:658

Add some raw bytes and advance the index.

alias for setBytes()

Arguments

  • bytes - can be a string, bytearray, or another IO object

Signature

def addBytes(self, ioBytes: Any):
    ...

IO().beginContext

Show source in init.py:94

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):
    ...

IO().bool16

Show source in init.py:172

Get bool16.

Signature

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

IO().bool16

Show source in init.py:177

Set bool16.

Signature

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

IO().bool32

Show source in init.py:182

Get bool32.

Signature

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

IO().bool32

Show source in init.py:187

Set bool32.

Signature

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

IO().bool64

Show source in init.py:192

Get bool64.

Signature

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

IO().bool64

Show source in init.py:197

Set bool64.

Signature

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

IO().bool8

Show source in init.py:162

Get bool8.

Signature

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

IO().bool8

Show source in init.py:167

Set a bool8.

Signature

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

IO().boolean

Show source in init.py:135

Return bool.

Signature

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

IO().boolean

Show source in init.py:148

Set bool.

Signature

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

IO().byte

Show source in init.py:202

Get byte.

Signature

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

IO().byte

Show source in init.py:207

Set byte.

Signature

@byte.setter
def byte(self, byte: Any):
    ...

IO().cString

Show source in init.py:845

Read a sequence of chars until the next null byte.

Signature

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

IO().cString

Show source in init.py:850

Set a sequence of chars and add a null byte.

Signature

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

IO().cStringA

Show source in init.py:856

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

Signature

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

IO().cStringA

Show source in init.py:861

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

Signature

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

IO().cStringU

Show source in init.py:878

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

Signature

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

IO().cStringU

Show source in init.py:883

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

Signature

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

IO().cStringW

Show source in init.py:867

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

Signature

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

IO().cStringW

Show source in init.py:872

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

Signature

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

IO().data

Show source in init.py:72

Return data.

Signature

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

IO().data

Show source in init.py:77

Set data.

Signature

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

IO().double

Show source in init.py:602

Get a double.

Signature

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

IO().double

Show source in init.py:607

Set a double.

Signature

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

IO().dword

Show source in init.py:242

Get a dword.

Signature

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

IO().dword

Show source in init.py:247

Set a dword.

Signature

@dword.setter
def dword(self, dword: Any):
    ...

IO().endContext

Show source in init.py:101

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

Signature

def endContext(self):
    ...

IO().float32

Show source in init.py:402

Get a float32.

Signature

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

IO().float32

Show source in init.py:409

Set a float32.

Signature

@float32.setter
def float32(self, float32: float):
    ...

IO().float32be

Show source in init.py:612

Read the next 32 bit float and advance the index.

Signature

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

IO().float32be

Show source in init.py:617

Set a 32 bit float.

Signature

@float32be.setter
def float32be(self, float32be: float):
    ...

IO().float32le

Show source in init.py:622

Read the next 32 bit float and advance the index.

Signature

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

IO().float32le

Show source in init.py:627

Set a 32 bit float.

Signature

@float32le.setter
def float32le(self, float32le: float):
    ...

IO().float64

Show source in init.py:417

Get a float64.

Signature

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

IO().float64

Show source in init.py:424

Set a float64.

Signature

@float64.setter
def float64(self, float64: float):
    ...

IO().float64be

Show source in init.py:632

Read the next 64 bit float and advance the index.

Signature

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

IO().float64be

Show source in init.py:637

Set a 64 bit float.

Signature

@float64be.setter
def float64be(self, float64be: float):
    ...

IO().float64le

Show source in init.py:642

Read the next 64 bit float and advance the index.

Signature

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

IO().float64le

Show source in init.py:647

Set a 64 bit float.

Signature

@float64le.setter
def float64le(self, float64le: float):
    ...

IO().floating

Show source in init.py:592

Get a float.

Signature

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

IO().floating

Show source in init.py:597

Set a float.

Signature

@floating.setter
def floating(self, floating: float):
    ...

IO().getBytes

Show source in init.py:652

Grab some raw bytes and advance the index.

Signature

def getBytes(self, nbytes: int):
    ...

IO().i16

Show source in init.py:312

Get an int16.

Signature

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

IO().i16

Show source in init.py:319

Set an int16.

Signature

@i16.setter
def i16(self, i16: int):
    ...

IO().i16be

Show source in init.py:502

Read the next signed int16 and advance the index.

Signature

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

IO().i16be

Show source in init.py:507

Set the int16.

Signature

@i16be.setter
def i16be(self, i16be: int):
    ...

IO().i16le

Show source in init.py:492

Read the next signed int16 and advance the index.

Signature

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

IO().i16le

Show source in init.py:497

Set the int16.

Signature

@i16le.setter
def i16le(self, i16le: int):
    ...

IO().i32

Show source in init.py:342

Get an int32.

Signature

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

IO().i32

Show source in init.py:349

Set an int32.

Signature

@i32.setter
def i32(self, i32: int):
    ...

IO().i32be

Show source in init.py:542

Read the next signed int32 and advance the index.

Signature

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

IO().i32be

Show source in init.py:547

Set the int32.

Signature

@i32be.setter
def i32be(self, i32be: int):
    ...

IO().i32le

Show source in init.py:532

Read the next signed int32 and advance the index.

Signature

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

IO().i32le

Show source in init.py:537

Set the int32.

Signature

@i32le.setter
def i32le(self, i32le: int):
    ...

IO().i64

Show source in init.py:372

Get an int64.

Signature

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

IO().i64

Show source in init.py:379

Set an int64.

Signature

@i64.setter
def i64(self, i64: int):
    ...

IO().i64be

Show source in init.py:582

Read the next signed int64 and advance the index.

Signature

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

IO().i64be

Show source in init.py:587

Set the int64.

Signature

@i64be.setter
def i64be(self, i64be: int):
    ...

IO().i64le

Show source in init.py:572

Read the next signed int64 and advance the index.

Signature

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

IO().i64le

Show source in init.py:577

Set the int64.

Signature

@i64le.setter
def i64le(self, i64le: int):
    ...

IO().i8

Show source in init.py:282

Get an int8.

Signature

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

IO().i8

Show source in init.py:289

Set an int8.

Signature

@i8.setter
def i8(self, i8: int):
    ...

IO().i8be

Show source in init.py:462

Read the next signed int8 and advance the index.

Signature

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

IO().i8be

Show source in init.py:467

Set the int8.

Signature

@i8be.setter
def i8be(self, i8be: int):
    ...

IO().i8le

Show source in init.py:452

Read the next signed int8 and advance the index.

Signature

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

IO().i8le

Show source in init.py:457

Set the int8.

Signature

@i8le.setter
def i8le(self, i8le: int):
    ...

IO().index

Show source in init.py:84

Return data.

Signature

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

IO().index

Show source in init.py:89

Set index.

Signature

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

IO().qword

Show source in init.py:262

Get a qword.

Signature

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

IO().qword

Show source in init.py:267

Set a qword.

Signature

@qword.setter
def qword(self, qword: Any):
    ...

IO().setBytes

Show source in init.py:667

Add some raw bytes and advance the index.

alias for addBytes()

Arguments

  • ioBytes - can be a string, bytearray, or another IO object

Signature

def setBytes(self, ioBytes: Any):
    ...

IO().sz754

Show source in init.py:717

sz754.

Signature

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

IO().sz754

Show source in init.py:722

Set sz754.

Signature

@sz754.setter
def sz754(self, sz754: Any):
    ...

IO().sz754A

Show source in init.py:727

sz754A.

Signature

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

IO().sz754A

Show source in init.py:732

Set sz754A.

Signature

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

IO().sz754U

Show source in init.py:747

sz754U.

Signature

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

IO().sz754U

Show source in init.py:752

Set sz754U.

Signature

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

IO().sz754W

Show source in init.py:737

sz754W.

Signature

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

IO().sz754W

Show source in init.py:742

Set sz754W.

Signature

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

IO().textLine

Show source in init.py:785

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

Signature

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

IO().textLine

Show source in init.py:793

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

Signature

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

IO().textLineA

Show source in init.py:800

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

Signature

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

IO().textLineA

Show source in init.py:808

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

Signature

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

IO().textLineU

Show source in init.py:830

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 init.py:838

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

Signature

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

IO().textLineW

Show source in init.py:815

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 init.py:823

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

Signature

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

IO().u16

Show source in init.py:327

Get an uint16.

Signature

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

IO().u16

Show source in init.py:334

Set an unint16.

Signature

@u16.setter
def u16(self, u16: int):
    ...

IO().u16be

Show source in init.py:472

Read the next uint16 and advance the index.

Signature

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

IO().u16be

Show source in init.py:477

Set the uint16.

Signature

@u16be.setter
def u16be(self, u16be: int):
    ...

IO().u16le

Show source in init.py:482

Read the next uint16 and advance the index.

Signature

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

IO().u16le

Show source in init.py:487

Set the uint16.

Signature

@u16le.setter
def u16le(self, u16le: int):
    ...

IO().u32

Show source in init.py:357

Get a uint32.

Signature

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

IO().u32

Show source in init.py:364

Set a unint32.

Signature

@u32.setter
def u32(self, u32: int):
    ...

IO().u32be

Show source in init.py:512

Read the next uint32 and advance the index.

Signature

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

IO().u32be

Show source in init.py:517

Set the uint32.

Signature

@u32be.setter
def u32be(self, u32be: int):
    ...

IO().u32le

Show source in init.py:522

Read the next uint32 and advance the index.

Signature

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

IO().u32le

Show source in init.py:527

Set the uint32.

Signature

@u32le.setter
def u32le(self, u32le: int):
    ...

IO().u64

Show source in init.py:387

Get a uint64.

Signature

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

IO().u64

Show source in init.py:394

Set a uint64.

Signature

@u64.setter
def u64(self, u64: int):
    ...

IO().u64be

Show source in init.py:552

Read the next uint64 and advance the index.

Signature

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

IO().u64be

Show source in init.py:557

Set the uint64.

Signature

@u64be.setter
def u64be(self, u64be: int):
    ...

IO().u64le

Show source in init.py:562

Read the next uint64 and advance the index.

Signature

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

IO().u64le

Show source in init.py:567

Set the uint64.

Signature

@u64le.setter
def u64le(self, u64le: int):
    ...

IO().u8

Show source in init.py:297

Get an unsigned int.

Signature

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

IO().u8

Show source in init.py:304

Set an unsigned int.

Signature

@u8.setter
def u8(self, u8: int):
    ...

IO().u8be

Show source in init.py:432

Read the next uint8 and advance the index.

Signature

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

IO().u8be

Show source in init.py:437

Set the uint8.

Signature

@u8be.setter
def u8be(self, u8be: int):
    ...

IO().u8le

Show source in init.py:442

Read the next uint8 and advance the index.

Signature

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

IO().u8le

Show source in init.py:447

Set the uint8.

Signature

@u8le.setter
def u8le(self, u8le: int):
    ...

IO().unsignedByte

Show source in init.py:212

Get unsigned byte.

Signature

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

IO().unsignedByte

Show source in init.py:217

Set unsigned byte.

Signature

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

IO().unsignedDword

Show source in init.py:252

Get a unsigned dword.

Signature

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

IO().unsignedDword

Show source in init.py:257

Set an unsigned dword.

Signature

@unsignedDword.setter
def unsignedDword(self, unsignedDword: Any):
    ...

IO().unsignedQword

Show source in init.py:272

Get an unsigned qword.

Signature

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

IO().unsignedQword

Show source in init.py:277

Set an unsigned qword.

Signature

@unsignedQword.setter
def unsignedQword(self, unsignedQword: Any):
    ...

IO().unsignedWord

Show source in init.py:232

Get an unsigned word.

Signature

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

IO().unsignedWord

Show source in init.py:237

Set an unsigned word.

Signature

@unsignedWord.setter
def unsignedWord(self, unsignedWord: Any):
    ...

IO().word

Show source in init.py:222

Get a word.

Signature

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

IO().word

Show source in init.py:227

Set a word.

Signature

@word.setter
def word(self, word: Any):
    ...