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.

bool Match=false;
int size1 = message1.ByteSize();
if (size1==message2.ByteSize())
unsigned char* buffer = new unsigned char[size1*2];
if (memcmp(buffer,buffer+size1,size1)==0)  Match = true;
delete[] buffer;

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
To unsubscribe from this group, send email to
For more options, visit this group at

Reply via email to