Skip to content

miniproto.tl.codec.decode_vector

decode_vector(data: bytes | memoryview, offset: int, item_type: str) -> tuple[tuple[Any, ...], int]

Decode a boxed TL vector.

Parameters:

  • data (bytes | memoryview) – TL wire bytes.
  • offset (int) – Offset at the vector constructor.
  • item_type (str) – Schema type of each item.

Returns:

  • tuple[tuple[Any, …], int] – Decoded immutable item tuple and first unread offset.

Raises: