Hi,
> pb_get_encoded_size() calculates 1728 Bytes length of the encoded message.
>
> When calling pb_encode_ex(...,PB_ENCODE_DELIMITED), there's the error
> message "stream full" in file pb_encode.c, line 746. This if statement
> checks (stream->bytes_written + size > stream->max_size). The actual values
> are 2 + 1728 > 1728.
PB_ENCODE_DELIMITED prepends the message length to the message in varint format.
For the length 1728, encoding the length takes 2 bytes.
--
Petteri