A bitfield type is probably not something that you have available in
all languages - which is what you need to keep in mind if you think of
supporting a particular type in protocol buffers.

Having said that, you could easily write some wrapper class for the
languages you use that stores bits in an arbitrary 'bytes'-string to
be used in your project. Should be only a couple of lines of code.
Or use a 'repeated bool' field if you don't care so much about space
(but I assume you want to do bit-boolean operations on the bit string
so you would need to convert it to a string or something anyway).

On Mon, Feb 15, 2010 at 07:40, Johannes Klug <[email protected]> wrote:
> My project needs to handle input data that contains bit strings of
> arbitrary length. Some structures are just one bit long, others 3 or
> 11.
>
> In Java, you can handle those types with BitSet, in C you can use bit
> fields.
>
> My question is: Do you see a "business case" for adding support for a
> type "bits" analogue to the "bytes" type?
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Protocol Buffers" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to 
> [email protected].
> For more options, visit this group at 
> http://groups.google.com/group/protobuf?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Protocol Buffers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/protobuf?hl=en.

Reply via email to