Pbrt.DecoderDecoding protobufs.
val of_bytes : bytes -> tof_bytes b creates a decoder positioned at start of bytes b.
val of_subbytes : bytes -> int -> int -> tof_subbytes b offset len creates a decoder positioned at offset in bytes b, reading at most len bytes. This is similar to of_bytes (Bytes.sub b offset len) but doesn't copy.
val of_string : string -> tof_string s creates a decoder positioned at start of string s.
val of_substring : string -> int -> int -> tSee of_subbytes.
type error = | Incomplete| Overlong_varint| Malformed_field| Overflow of string| Unexpected_payload of string * payload_kind| Missing_field of string| Malformed_variant of stringval error_to_string : error -> stringerror_to_string e converts error e to its string representation.
exception Failure of errorRaised in decoding combinators
malformed_variant variant_name raises the exception Protobuf.Decoder.Failure (Malformed_variant variant_name)
val unexpected_payload : string -> payload_kind -> 'aunexpected_payload field_name pk raises the exception Protobuf.Decoder.Failure (Unexpected_payload (field_name, pk))
missing_field field_name raises the exception Protobuf.Decoder.Failure (Missing_field field_name)
val key : t -> (int * payload_kind) optionkey d reads a key and a payload kind from d. If d has exhausted its input when the function is called, returns None. If d has exhausted its input while reading, raises Failure Incomplete. If the payload kind is unknown, raises Failure Malformed_field.
val skip : t -> payload_kind -> unitskip d pk skips the next value of kind pk in d. If skipping the value would exhaust input of d, raises Encoding_error Incomplete.
nested d returns a decoder for a message nested in d. If reading the message would exhaust input of d, raises Failure Incomplete.
val empty_nested : t -> unitempty_nested d skips an empty message of 0 length. If reading the message would exhaust input of d, raises Failure Incomplete.
packed_fold f e0 d folds over the a packed encoding with f acc d and initial value e0. If reading the message would exhaust input of d, raises Failure Incomplete.
val int_as_varint : t -> intint_as_varint d reads an int value from d with Varint encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val int_as_zigzag : t -> intint_as_zigzag d reads an int value from d with zigzag encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val int32_as_varint : t -> int32int32_as_varint d reads an int32 value from d with Varint encoding. If the integer value read cannot be converted to int32 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val int32_as_zigzag : t -> int32int32_as_varint d reads an int32 value from d with zigzag encoding. If the integer value read cannot be converted to int32 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val int64_as_varint : t -> int64int64_as_varint d reads an int64 value from d with Varint encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val int64_as_zigzag : t -> int64int64_as_varint d reads an int64 value from d with zigzag encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val int32_as_bits32 : t -> int32int32_as_bits32 d reads an int32 value from d with 32 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val int64_as_bits64 : t -> int64int64_as_bits64 d reads an int64 value from d with 64 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val uint32_as_varint : t -> [ `unsigned of int32 ]val uint32_as_zigzag : t -> [ `unsigned of int32 ]val uint64_as_varint : t -> [ `unsigned of int64 ]val uint64_as_zigzag : t -> [ `unsigned of int64 ]val uint32_as_bits32 : t -> [ `unsigned of int32 ]val uint64_as_bits64 : t -> [ `unsigned of int64 ]val bool : t -> boolbool d reads a bool value from d with varing encoding. If the boolean value in d is neither 0 or 1 raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val float_as_bits32 : t -> floatfloat_as_bits32 d reads a float value from d with 32 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val float_as_bits64 : t -> floatfloat_as_bits64 d reads a float value from d with 64 bit encoding. If reading the message would exhaust input of d, raises Failure Incomplete.
val int_as_bits32 : t -> intint_as_bits32 d reads a int value from d with 32 bit encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val int_as_bits64 : t -> intint_as_bits64 d reads a int value from d with 64 bit encoding. If the integer value read cannot be converted to int raises Failure Overflow "". If reading the message would exhaust input of d, raises Failure Incomplete.
val string : t -> stringstring d reads a string value from d. If reading the message would exhaust input of d, raises Failure Incomplete.
val bytes : t -> bytesbytes d reads a bytes value from d. If reading the message would exhaust input of d, raises Failure Incomplete.
val wrapper_double_value : t -> float optionval wrapper_float_value : t -> float optionval wrapper_int64_value : t -> int64 optionval wrapper_int32_value : t -> int32 optionval wrapper_bool_value : t -> bool optionval wrapper_string_value : t -> string optionval wrapper_bytes_value : t -> bytes option