[protobuf] How to define Structured Binary file

2014-10-06 Thread RPMASA
Hi, I have structured binary file specifying size of each element in bytes. How can I mentioned them in ptoto file? No. Description Data Value Variable Type Number of bytes 1 A1 0=unuse, 1=use byte 1 2 A2 0=unuse, 1=use byte 1 3 A3 false=unuse, true=use byte 1 2-2.

Re: [protobuf] How to define Structured Binary file

2014-10-06 Thread Marc Gravell
You cannot. What you describe is not what protobuf offers. On 7 Oct 2014 00:55, RPMASA rudram...@gmail.com wrote: Hi, I have structured binary file specifying size of each element in bytes. How can I mentioned them in ptoto file? No. Description Data Value Variable Type Number of

Re: [protobuf] How to define Structured Binary file

2014-10-06 Thread Ilia Mirkin
Not sure what is being asked, but simply having a bytes foo = 1; will cause the presence of the field, the length of the field, and the contents of the field to be encoded into the resulting binary representation (as tagid 1 length varint length bytes). However enforcing maximum lengths/other