Re: [protobuf] message - group?

2010-04-29 Thread Adam Kwintkiewicz
hmm this is a slight problem. I am iterating over the nested messages and then generating a message/group code. I don't have reference to the specific field 2010/4/29 Kenton Varda ken...@google.com A single message type can be used as both a message and as a group, so there is no way to tell

Re: [protobuf] message - group?

2010-04-29 Thread Adam Kwintkiewicz
generators generate exactly the same code for message classes whether they be nested messages or groups. Version 1 of protocol buffers generated different classes and it proved to be an enormous pain. On Thu, Apr 29, 2010 at 2:04 PM, Adam Kwintkiewicz adam.kwintkiew...@gmail.com wrote: hmm

Re: [protobuf] packed repeated fields / extensions

2010-04-26 Thread Adam Kwintkiewicz
Thank you 2010/4/26 Jason Hsueh jas...@google.com The packed option is specified in the FieldOptions proto: const FieldDescriptor* f = ...; if (f-options().packed()) { // field is packed } On Mon, Apr 26, 2010 at 2:29 PM, adamdms adam.kwintkiew...@gmail.comwrote: how to check

Re: [protobuf] int32 negative numbers

2010-03-21 Thread Adam Kwintkiewicz
... for a negative number, the resulting varint is *always ten bytes long ...* I didn't saw that part. Thanx 2010/3/21 Evan Jones ev...@mit.edu On Mar 21, 2010, at 8:46 , adamdms wrote: I am wonder why int32 field (with negative value) has 10 bytes? 10 - field No 2, wire type 0 FD FF FF FF

Re: [protobuf] int32 negative numbers

2010-03-21 Thread Adam Kwintkiewicz
Thank you for your reply. Yes you are right. I just wondered why int32 consists of 10 bits, rather than a maximum of 5 (in the case of large or negative numbers). Adam 2010/3/21 Henner Zeller henner.zel...@googlemail.com On Sun, Mar 21, 2010 at 08:05, Adam Kwintkiewicz adam.kwintkiew

Re: [protobuf] strange encoding

2010-03-01 Thread Adam Kwintkiewicz
I see my mistakes. Thanks On 1 Mar 2010 08:44, Kenton Varda ken...@google.com wrote: On Sun, Feb 28, 2010 at 3:47 AM, adamdms adam.kwintkiew...@gmail.com wrote: I created (from tu... This is field number 1, wire type 2 (length-delimited). Remember that the thing you are encoding is an