surf_from_hex

surf_from_hex(hex_string: str, dstream_algo: ModuleType, *, dstream_S: int, dstream_storage_bitoffset: int | None = None, dstream_storage_bitwidth: int, dstream_T_bitoffset: int = 0, dstream_T_bitwidth: int = 32) HereditaryStratigraphicSurface

Deserialize a HereditaryStratigraphicSurface object from a hex string representation.

Hex string representation needs exactly two contiguous parts: 1. dstream_T (which is the number of depositions elapsed), and 2. dstream_storage (which holds all the stored differentiae).

Data in hex string representation should use big-endian byte order.

Parameters

hex_string: str

Hex string to be parsed, which can be uppercase or lowercase.

dstream_algo: module

Dstream algorithm for curation of retained differentia.

dstream_storage_bitoffset: int, default dstream_T_bitwidth

Number of bits before the storage.

dstream_storage_bitwidth: int

Number of bits used for storage.

dstream_T_bitoffset: int, default 0

Number of bits before dstream_T.

dstream_T_bitwidth: int, default 32

Number of bits used to store dstream_T.

dstream_S: int

Number of buffer sites available to store differentiae.

Determines how many differentiae are unpacked from storage.

See Also

surf_to_hex()

Serialize a surface into a hex string.