Re: [protobuf] Serialized Message Field Order

2010-07-06 Thread Srivats P
@evan: That's what I'm doing currently - serializing and writing the bytestream for the magic, checksum and actual content messages separately and in that order - I was just wondering if I could put them all into one message { ... } and just serialize one message instead of three. - Srivats On

Re: [protobuf] Serialized Message Field Order

2010-07-06 Thread Evan Jones
On Jul 6, 2010, at 7:33 , Srivats P wrote: @evan: That's what I'm doing currently - serializing and writing the bytestream for the magic, checksum and actual content messages separately and in that order - I was just wondering if I could put them all into one message { ... } and just serialize

[protobuf] Serialized Message Field Order

2010-07-05 Thread Srivats P
Hi, From http://code.google.com/apis/protocolbuffers/docs/encoding.html quote when a message is serialized its known fields should be written sequentially by field number, as in the provided C++, Java, and Python serialization code /quote Like the encoded wire format, is the above guaranteed for

Re: [protobuf] Serialized Message Field Order

2010-07-05 Thread Marc Gravell
From the encoding spec, it is required (or at least: recommended) to handle out-of-order fields. I guess *in part* this helps with message concatenation. I also know of at least one case where I knowingly emit fields out of order (in my implementation; not related to the core Google