Bytes sequence incremental unpacker.

[plum.buffer] Module Reference

The plum.buffer module provides the Buffer class for the purposes of incrementally unpacking Python objects out of a bytes sequence. See the Unpacking Bytes tutorial for more information.

API Reference

class plum.buffer.Buffer

Bytes sequence incremental unpacker.

unpack(fmt: Union[Dict[str, Any], List[Any], plum.transform.Transform, Tuple[Any, ...], Type[plum.data.Data], None])

Unpack value from formatted bytes at current buffer offset.

Raises:UnpackError if insufficient bytes or value error
unpack_and_dump(fmt: Union[Dict[str, Any], List[Any], plum.transform.Transform, Tuple[Any, ...], Type[plum.data.Data], None])

Unpack value from bytes at current offset and produce a packed bytes summary.

Raises:UnpackError if insufficient bytes or value error