5 ms·
Framing is a distinct concern from payload serialization. Most protocols and serialization formats already define a form of length-prefixed framing; requiring
by catiopatio 3y ago
Framing is a distinct concern from payload serialization.
Most protocols and serialization formats already define a form of length-prefixed framing; requiring that a protobuf payload also carry such a header would simply be a waste of bytes.
Additionally, it ensures that protobuf can be serialized and streamed without first computing the payload length, which would require serializing the entire message first.