package pbrt
Module Pbrt.EncoderSource
Types
Error
Creator
Clears the content and resets internal storage to its initial memory consumption. This is more costly than clear but can be useful after a very large message was encoded.
Convertion
write_chunks w e calls the write function w (e.g output oc for some output channel oc) on every chunk inside e. The number of chunks is an implementation detail.
Encoding Functions
key (k, pk) e writes a key and a payload kind to e.
nested f e applies f to an encoder for a message nested in e.
val map_entry :
encode_key:('a -> t -> unit) ->
encode_value:('b -> t -> unit) ->
(('a * payload_kind) * ('b * payload_kind)) ->
t ->
unitint_as_zigzag i e encodes i in e with Varint zigzag encoding
int32_as_varint i e encodes i in e with Varint encoding
int32_as_varint i e encodes i in e with Varint zigzag encoding
int64_as_varint i e encodes i in e with Varint encoding
int64_as_varint i e encodes i in e with Varint zigzag encoding
int32_as_varint i e encodes i in e with Bits32 encoding
int64_as_varint i e encodes i in e with Bits64 encoding
float_as_bits32 f e encodes f in e with Bits32 encoding
float_as_bits64 f e encodes f in e with Bits64 encoding
int_as_bits32 i e encodes i in e with Bits32 encoding TODO : add error handling