The simple answer would be "use the existing oversized types, and cast at
the caller". Varint data in particular will either be 1 byte or 2 (50%
each) for byte values. For longer sequences (rgba etc) there are existing
fixed-32 and bytes.

If the intent is to add a wire type to precisely represent a byte: that is
hugely problematic. Adding a wire type is a significant thing, as:

- the numbers of wire types is strictly limited, and there isn't much spare
(unless the next wire type somehow means "check the next byte for the
longer wire type", or something)
- all existing clients, libraries and deployments would need updating to
even touch data with that wire type - it isn't even possible to ignore the
data if you don't understand the wire type.

Marc
On 30 Jun 2014 18:20, <proto...@googlecode.com> wrote:

>
> Comment #4 on issue 269 by thecodem...@gmail.com: Would like to have byte
> or int8 type for the message definition
> http://code.google.com/p/protobuf/issues/detail?id=269
>
> I don't need a fixed length string; I want to encode RGB or RGBA data as 3
> or 4 bytes. I could pack them into an int32, but it seems like a byte type
> is a perfectly reasonable request.
>
> --
> You received this message because this project is configured to send all
> issue notifications to this address.
> You may adjust your notification preferences at:
> https://code.google.com/hosting/settings
>
> --
> 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 this group, send email to protobuf@googlegroups.com.
> Visit this group at http://groups.google.com/group/protobuf.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 this group, send email to protobuf@googlegroups.com.
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to