Field

class pystructs.fields.Field(size: int)[source]

Abstract class for parsing bytes by calculating offset and size variable

fetch()[source]

process to work value from bytes

initialize(root: Field)[source]

process to initialize, eg. link_fields, set bytes of root field, etc…

Parameters:root (Field) – root field
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