Struct

class pystructs.fields.Struct(_bytes: bytes = b'', auto_initialization=True)[source]

struct implementations that inherit BytesField

link fields and calculate offset and variable values automatically

fetch() → Struct[source]

process to work value from bytes

fields = {}

Reflection of fields from struct

initialize(root: Optional[Struct] = None)[source]

link fields and set parent, initialize each fields

Parameters:root – Struct object of root
Returns:
is_root

bool value about this field is root

Type:bool
offset

offset of this

Type:int
parent

parent field of this, eg. Struct created by user

Type:Field
prev

previous field of this, to be used in calculation offset

Type:Field
size

size of this

Type:int