class documentation

Read primitive values from one protobuf-encoded byte sequence.

Method __init__ Undocumented
Method eof Return whether the input was consumed completely.
Method raw_bytes Return an already-read byte range without changing the position.
Method read_bool Undocumented
Method read_bytes Undocumented
Method read_double Undocumented
Method read_fixed32 Undocumented
Method read_fixed64 Undocumented
Method read_float Undocumented
Method read_int32 Undocumented
Method read_int64 Undocumented
Method read_packed Read a length-delimited sequence with the supplied primitive reader.
Method read_sfixed32 Undocumented
Method read_sfixed64 Undocumented
Method read_sint32 Undocumented
Method read_sint64 Undocumented
Method read_string Undocumented
Method read_tag Return (field_number, wire_type, tag_start).
Method read_uint32 Undocumented
Method read_uint64 Undocumented
Method read_varint Read one unsigned 64-bit varint.
Method skip_field Skip a field and return its complete original encoded bytes.
Class Variable __slots__ Undocumented
Property position Current byte offset.
Property remaining Number of unread bytes.
Method _read_exact Undocumented
Method _skip_group Undocumented
Method _skip_value Undocumented
Instance Variable _data Undocumented
Instance Variable _max_depth Undocumented
Instance Variable _pos Undocumented
def __init__(self, data: bytes | bytearray | memoryview, *, max_depth: int = 100, max_bytes: int | None = None): (source)

Undocumented

def eof(self) -> bool: (source)

Return whether the input was consumed completely.

def raw_bytes(self, start: int, end: int | None = None) -> bytes: (source)

Return an already-read byte range without changing the position.

def read_bool(self) -> bool: (source)

Undocumented

def read_bytes(self) -> bytes: (source)

Undocumented

def read_double(self) -> float: (source)

Undocumented

def read_fixed32(self) -> int: (source)

Undocumented

def read_fixed64(self) -> int: (source)

Undocumented

def read_float(self) -> float: (source)

Undocumented

def read_int32(self) -> int: (source)

Undocumented

def read_int64(self) -> int: (source)

Undocumented

def read_packed(self, read_value: Callable[[], T]) -> list[T]: (source)

Read a length-delimited sequence with the supplied primitive reader.

def read_sfixed32(self) -> int: (source)

Undocumented

def read_sfixed64(self) -> int: (source)

Undocumented

def read_sint32(self) -> int: (source)

Undocumented

def read_sint64(self) -> int: (source)

Undocumented

def read_string(self) -> str: (source)

Undocumented

def read_tag(self) -> tuple[int, int, int]: (source)

Return (field_number, wire_type, tag_start).

def read_uint32(self) -> int: (source)

Undocumented

def read_uint64(self) -> int: (source)

Undocumented

def read_varint(self) -> int: (source)

Read one unsigned 64-bit varint.

def skip_field(self, field_number: int, wire_type: int, tag_start: int) -> bytes: (source)

Skip a field and return its complete original encoded bytes.

__slots__: tuple[str, ...] = (source)

Undocumented

Current byte offset.

Number of unread bytes.

def _read_exact(self, size: int) -> memoryview: (source)

Undocumented

def _skip_group(self, field_number: int): (source)

Undocumented

def _skip_value(self, field_number: int, wire_type: int): (source)

Undocumented

Undocumented

_max_depth = (source)

Undocumented

Undocumented