> Given that the serialized bytes have to be able to *deserialize* back
> to the original messages, surely if those original messages aren't
> equal, the serialized forms would have to be different too - assuming
> we're talking about the same message type

But, as in my example, that doesn't seem to be the case (necessarily).
Again, for example, let's say you have two messages, both of the same
type. The proto defines two optional fields, both of type variable
int64.

Say message A poopulates both optional fields:
[1 byte tag] [3 byte value] [1 byte tag] [2 byte value] = 7 bytes

And message B populates only one optional field:
[1 byte tag] [6 byte value] = 7 bytes

Couldn't these generate, by chance, the same 7 bytes? Yes, using
deserialize will correctly parse two unequal messages, but if you look
at the raw serialized byte sequences, they could actually be the same.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
protobuf+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to