|Did you know ...||Search Documentation:|
:- use_module(library(protobufs)).(can be autoloaded)
.protodescription, similar to the processing done by
protoc --decode_raw. This means that field names aren't shown: only field numbers.
For unmarshalling, a simple heuristic is used on length-delimited segments: first interpret it as a message; if that fails, try to interpret as a UTF8 string; otherwise, leave it as a "blob" (if the heuristic was wrong, you can convert to a string or a blob by using protobuf_segment_convert/2). 32-bit and 64-bit numbers are left as codes because they could be either integers or floating point (use int32_codes/2, float32_codes/2, int64_codes/2, float64_codes/2 as appropriate); variable-length numbers ("varint" in the Protocol Buffers encoding documentation), might require "zigzag" conversion, integer_zigzag/2.
|Segments||a list containing terms of the
following form (|
For deciding how to interpret a length-delimited item (when
The interpretation of length-delimited items can sometimes guess wrong; the interpretation can be undone by using protobuf_segment_convert/2 to convert the incorrect segment to a string or a list of codes.
|WireStream||a code list that was generated by a protobuf endoder.|
packed(it's treated as
protoc --decode, which will use field names rather than field numbers and also will not need heuristics to guess at segment types because it will have the correct types from the .proto definition.