dissect.cstruct.types.instance

Module Contents

Classes

Instance

Holds parsed structure data.

class dissect.cstruct.types.instance.Instance(type_: dissect.cstruct.types.BaseType, values: Dict[str, Any], sizes: Dict[str, int] = None)

Holds parsed structure data.

__slots__ = ('_type', '_values', '_sizes')
__getattr__(attr: str) Any
__setattr__(attr: str, value: Any) None

Implement setattr(self, name, value).

__getitem__(item: str) Any
__contains__(attr: str) bool
__repr__() str

Return repr(self).

__len__() int
__bytes__() bytes
write(stream: BinaryIO) int

Write this structure to a writable file-like object.

Parameters:

fh – File-like objects that supports writing.

Returns:

The amount of bytes written.

dumps() bytes

Dump this structure to a byte string.

Returns:

The raw bytes of this structure.