On 22 December 2016 at 14:50, wrote:
> Thanks for the reply.
>
> My question here is: I use protobuffer to store a bytes data, how can I
> retrieve it back?
Symmetric to the SerializeToArray(), use ParseFromArray() or
ParseFromString() to parse a serialized version of a
It looks like you are building up a protocol buffer containing a serialized
protocol buffer, which itself contains a serialized protocol buffer, which
in turn contains a serialized protocol buffer, etc. Each level of nesting
requires an additional two bytes: one byte for the tag number and a
I defined a simple bytes message below
message MfStream {
bytes message=1;
}
and run a test below, in which I use for a loop to keep
serialize/deserialize the bytes message.
char buf[1024];
int tmp = 1;
MfStream testMsg;
testMsg.set_message(, sizeof(tmp));
for (int i=0; i<5; i++) {
int