Field Decoders
Dispatches field types to concrete decoders, including quantized float handling and packed value decoding.
See also: How Proto Parsing Works
Generated API
gem.schema.field_decoder.find_decoder
find_decoder
python
def find_decoder(field: _FieldLike) -> FieldDecoderReturn the appropriate decoder for the given field.
Source: src/gem/schema/field_decoder/type_resolver.py:124
gem.schema.field_decoder.find_decoder_by_base_type
find_decoder_by_base_type
python
def find_decoder_by_base_type(base_type: str) -> FieldDecoderReturn a decoder for a base type string without field context.
Source: src/gem/schema/field_decoder/type_resolver.py:156
gem.schema.field_decoder.QuantizedFloatDecoder
QuantizedFloatDecoder
python
class QuantizedFloatDecoderDecoder for Source 2 quantized floats (CNetworkedQuantizedFloat).
Source: src/gem/schema/field_decoder/quantized_float.py:19
Methods
decode
Signature: def QuantizedFloatDecoder.decode(self, r: BitReader) -> float
Read and decode one quantized float from r.