Skip to content

miniproto.tl.codec.decode_bool

decode_bool(data: bytes | memoryview, offset: int = 0) -> tuple[bool, int]

Decode a TL Bool constructor.

Parameters:

  • data (bytes | memoryview) – TL wire bytes.
  • offset (int) – Starting byte offset, defaulting to 0.

Returns:

  • tuple[bool, int] – Boolean value and first unread offset.

Raises: