Re: [protobuf] Are protobufs serialised canonically?

2017-07-26 Thread alex
That certainly helps. Thanks. I'd suspected what we are doing was unsafe. On Wednesday, July 26, 2017 at 12:16:26 AM UTC+1, Marc Gravell wrote: > > Formally: no. > > Practically: almost always > > You shouldn't **demand** it. > > Basically, it goes like this: > > - the spec asks that writers *sh

Re: [protobuf] Are protobufs serialised canonically?

2017-07-25 Thread Marc Gravell
Formally: no. Practically: almost always You shouldn't **demand** it. Basically, it goes like this: - the spec asks that writers *should* write fields in order - the spec asks that readers *must* allow fields in any order - data can be concatenated as a merge, meaning fields can appear out of o

Re: [protobuf] Are protobufs serialised canonically?

2017-07-25 Thread 'Bo Yang' via Protocol Buffers
I guess I just replied to that thread. On Tue, Jul 25, 2017 at 1:26 PM wrote: > (Attempt 2 - I'm not sure if messages to this list and moderated or > whether my first one just got lost in the ether) > > Are protobufs serialised canonically? By that I mean is the same message > with the same fie

[protobuf] Are protobufs serialised canonically?

2017-07-25 Thread alex
(Attempt 2 - I'm not sure if messages to this list and moderated or whether my first one just got lost in the ether) Are protobufs serialised canonically? By that I mean is the same message with the same fields populated with the same data guaranteed to serialise to the same sequence of bytes,