[protobuf] Compile .proto from java

2013-05-29 Thread Ivan Bazhenov
How do I compile .proto files directly from java program? -- You received this message because you are subscribed to the Google Groups Protocol Buffers group. To unsubscribe from this group and stop receiving emails from it, send an email to protobuf+unsubscr...@googlegroups.com. To post to

[protobuf] encoding: how to distinguish message and the field

2013-05-29 Thread mimocroc
Hi! I am writing my own library for working with protobuf for D language (dlang.org) and have a question: Each message is preceded by a header in the length delimited format and has tag which contains number of field. How I can distinguish message header with field number and real field

Re: [protobuf] encoding: how to distinguish message and the field

2013-05-29 Thread Ilia Mirkin
Messages aren't preceded by anything. A message inside of a message is preceeded by a varint that indicates its length (there's also a deprecated begin/end group mechanism that you probably don't have to worry about supporting). Then, for that length after the varint, decoding of the sub-message

Re: [protobuf] encoding: how to distinguish message and the field

2013-05-29 Thread mimocroc
Thanks for your answer! (My mistake because I am checked my code on the example binary, generated by add_person_cpp, who (apparently) puts each message into a separate message-formatted container.) четверг, 30 мая 2013 г., 1:13:21 UTC+8 пользователь Ilia Mirkin написал: Messages aren't

[protobuf] Re: Issue 491 in protobuf: Optional field throws NullPointerException when not set values.

2013-05-29 Thread protobuf
Comment #6 on issue 491 by xiaof...@google.com: Optional field throws NullPointerException when not set values. http://code.google.com/p/protobuf/issues/detail?id=491 We don't have the intention to change to the current behavior. Passing null is likely to be a programming error. Allowing