Functions | |
def | _DecodeFixed32 (buffer, pos) |
def | _DecodeFixed64 (buffer, pos) |
def | _DecodeUnknownField (buffer, pos, wire_type) |
def | _DecodeUnknownFieldSet (buffer, pos, end_pos=None) |
def | _DoubleDecoder () |
def | _EndGroup (buffer, pos, end) |
def | _FieldSkipper () |
def | _FloatDecoder () |
def | _ModifiedDecoder (wire_type, decode_value, modify_value) |
def | _RaiseInvalidWireType (buffer, pos, end) |
def | _SignedVarintDecoder (bits, result_type) |
def | _SimpleDecoder (wire_type, decode_value) |
def | _SkipFixed32 (buffer, pos, end) |
def | _SkipFixed64 (buffer, pos, end) |
def | _SkipGroup (buffer, pos, end) |
def | _SkipLengthDelimited (buffer, pos, end) |
def | _SkipVarint (buffer, pos, end) |
def | _StructPackDecoder (wire_type, format) |
def | _VarintDecoder (mask, result_type) |
def | BytesDecoder (field_number, is_repeated, is_packed, key, new_default) |
def | BytesDecoder (field_number, is_repeated, is_packed, key, new_default, clear_if_default=False) |
def | EnumDecoder (field_number, is_repeated, is_packed, key, new_default) |
def | EnumDecoder (field_number, is_repeated, is_packed, key, new_default, clear_if_default=False) |
def | GroupDecoder (field_number, is_repeated, is_packed, key, new_default) |
def | MapDecoder (field_descriptor, new_default, is_message_map) |
def | MessageDecoder (field_number, is_repeated, is_packed, key, new_default) |
def | MessageSetItemDecoder (descriptor) |
def | ReadTag (buffer, pos) |
def | StringDecoder (field_number, is_repeated, is_packed, key, new_default, is_strict_utf8=False) |
|
private |
Decode a fixed32.
Definition at line 992 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Decode a fixed64.
Definition at line 910 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Decode a unknown field. Returns the UnknownField and new position.
Definition at line 954 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Decode UnknownFieldSet. Returns the UnknownFieldSet and new position.
Definition at line 937 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Returns a decoder for a double field. This code works around a bug in struct.unpack for not-a-number.
Definition at line 346 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skipping an END_GROUP tag returns -1 to tell the parent loop to break.
Definition at line 977 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Constructs the SkipField function.
Definition at line 1004 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Returns a decoder for a float field. This code works around a bug in struct.unpack for non-finite 32-bit floating-point values.
Definition at line 301 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Like SimpleDecoder but additionally invokes modify_value on every value before storing it. Usually modify_value is ZigZagDecode.
Definition at line 262 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip function for unknown wire types. Raises an exception.
Definition at line 999 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Like _VarintDecoder() but decodes signed values.
Definition at line 139 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Return a constructor for a decoder for fields of a particular type. Args: wire_type: The field's wire type. decode_value: A function which decodes an individual value, e.g. _DecodeVarint()
Definition at line 203 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip a fixed32 value. Returns the new position.
Definition at line 983 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip a fixed64 value. Returns the new position.
Definition at line 901 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip sub-group. Returns the new position.
Definition at line 926 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip a length-delimited value. Returns the new position.
Definition at line 916 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Skip a varint value. Returns the new position.
Definition at line 889 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Return a constructor for a decoder for a fixed-width field. Args: wire_type: The field's wire type. format: The format string to pass to struct.unpack().
Definition at line 276 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Return an encoder for a basic varint value (does not include tag). Decoded values will be bitwise-anded with the given mask before being returned, e.g. to limit them to 32 bits. The returned decoder does not take the usual "end" parameter -- the caller is expected to do bounds checking after the fact (often the caller can defer such checking until later). The decoder returns a (value, new_pos) pair.
Definition at line 112 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.BytesDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default | |||
) |
Returns a decoder for a bytes field.
Definition at line 612 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.BytesDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default, | |||
clear_if_default = False |
|||
) |
Returns a decoder for a bytes field.
Definition at line 596 of file protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.EnumDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default | |||
) |
Definition at line 386 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.EnumDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default, | |||
clear_if_default = False |
|||
) |
Returns a decoder for enum field.
Definition at line 372 of file protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.GroupDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default | |||
) |
Returns a decoder for a group field.
Definition at line 649 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.MapDecoder | ( | field_descriptor, | |
new_default, | |||
is_message_map | |||
) |
Returns a decoder for a map field.
Definition at line 843 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.MessageDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default | |||
) |
Returns a decoder for a message field.
Definition at line 696 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.MessageSetItemDecoder | ( | descriptor | ) |
Returns a decoder for a MessageSet item. The parameter is the message Descriptor. The message set message looks like this: message MessageSet { repeated group Item = 1 { required int32 type_id = 2; required string message = 3; } }
Definition at line 750 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.ReadTag | ( | buffer, | |
pos | |||
) |
Read a tag from the memoryview, and return a (tag_bytes, new_pos) tuple. We return the raw bytes of the tag rather than decoding them. The raw bytes can then be used to look up the proper decoder. This effectively allows us to trade some work that would be done in pure-python (decoding a varint) for work that is done in C (searching for a byte string in a hash table). In a low-level language it would be much cheaper to decode the varint and use that, but not in Python. Args: buffer: memoryview object of the encoded bytes pos: int of the current position to start from Returns: Tuple[bytes, int] of the tag data and new position.
Definition at line 174 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.StringDecoder | ( | field_number, | |
is_repeated, | |||
is_packed, | |||
key, | |||
new_default, | |||
clear_if_default = False |
|||
) |
Returns a decoder for a string field.
Definition at line 552 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 81 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 109 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 167 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 171 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 166 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 170 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
Definition at line 104 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
Definition at line 103 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 102 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 92 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
|
private |
Definition at line 87 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.BoolDecoder |
Definition at line 548 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.DoubleDecoder = _DoubleDecoder() |
Definition at line 546 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.Fixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, '<I') |
Definition at line 541 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.Fixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, '<Q') |
Definition at line 542 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.FloatDecoder = _FloatDecoder() |
Definition at line 545 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.Int32Decoder |
Definition at line 523 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.Int64Decoder |
Definition at line 526 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
google.protobuf.internal.decoder.long = int |
Definition at line 89 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
google.protobuf.internal.decoder.MESSAGE_SET_ITEM_TAG = encoder.TagBytes(1, wire_format.WIRETYPE_START_GROUP) |
Definition at line 748 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.SFixed32Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED32, '<i') |
Definition at line 543 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.SFixed64Decoder = _StructPackDecoder(wire_format.WIRETYPE_FIXED64, '<q') |
Definition at line 544 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.SInt32Decoder |
Definition at line 532 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.SInt64Decoder |
Definition at line 534 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.SkipField = _FieldSkipper() |
Definition at line 1036 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.UInt32Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint32) |
Definition at line 529 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.
def google.protobuf.internal.decoder.UInt64Decoder = _SimpleDecoder(wire_format.WIRETYPE_VARINT, _DecodeVarint) |
Definition at line 530 of file bloaty/third_party/protobuf/python/google/protobuf/internal/decoder.py.