Proto::Wire::Reader
Reader wraps an IO and provides typed protobuf wire-format read primitives.
Entry point for message decode loops is read_tag, which returns nil on
clean EOF (end of message) and raises DecodeError on malformed input.
All other read methods raise DecodeError on unexpected EOF.
Constants
DEFAULT_MAX_FIELD_LENGTH = (8 * 1024) * 1024
DEFAULT_MAX_MESSAGE_SIZE = (64_i64 * 1024) * 1024
MAX_FIELD_NUMBER = 536870911
Constructors
Class methods
Instance methods
expect_wire_type!(field_number : Int32, wire_type : Int32, expected_wire_type : Int32, alternate_wire_type : Int32) : Nil
Sourceread_bool
Sourceread_bytes
Sourceread_double
Sourceread_embedded
Return a scoped IO::Memory over the next length-delimited field. The bytes are consumed from this reader immediately.
read_fixed32
Sourceread_fixed64
Sourceread_float
Sourceread_int64
Sourceread_packed_varint
Decode a packed repeated varint field into the given array. Yields each decoded UInt64 raw value; callers convert as needed.
read_sfixed32
Sourceread_sfixed64
Sourceread_sint64
Sourceread_string
Sourceread_uint64
Source