On Fri, May 8, 2009 at 5:50 AM, Peter K. <koots...@gmail.com> wrote:
> Hi,
> I'm not a PB expert, but I don't believe that the basic types support
> bitfields.
> One way to do it is to just expand each bitfield into a "uint32".

fixed32 or fixed64 would be probably better. uint32 is encoded in
variable length which would make bitfields typically larger than

> Another way might be to just refer to all the bitfields as "bytes".
> We chose the first approach, but YMMV.
> Ciao,
> Peter K.
> On May 8, 2:02 am, swapnil...@gmail.com wrote:
>> Hi All,
>> I have a project in which we are using Protocol buffers (C++ ). The
>> existing code for uses bit fields.
>> i would like to know can we use bit fields in .proto file? If yes then
>> please tell me how to use it?
> >

You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to protobuf@googlegroups.com
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to