Check if sizes are the same, if so create a buffer of that size, seralize
both of the messages into it as array of byte then use memcmp.
Clean up the data once your done.
Maybe something like this. But yeah a .Equal would be perfect.
int size1 = message1.ByteSize();
unsigned char* buffer = new unsigned char[size1*2];
if (memcmp(buffer,buffer+size1,size1)==0) Match = true;
My bad if my code sucks im still new to proto and don't know
it properly yet :)
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To view this discussion on the web visit
To post to this group, send email to firstname.lastname@example.org.
To unsubscribe from this group, send email to
For more options, visit this group at