Why not just use a varint? You can use the zigzag variants if you want
to store things like -1 efficiently. The only time you'd benefit from
having a fixed8/fixed16 field is if the high bits are set, and it'd
only be by 1 byte.

  -ilia

On Tue, May 24, 2016 at 11:32 AM, Douglas Lewis <[email protected]> wrote:
> I'm talking about fixed integers.  We have certain elements of the messages
> that we only need/want resolution to 16 bits or 8 bits.
>
> - Doug
>
>
> On Tuesday, May 24, 2016 at 10:06:50 AM UTC-5, Douglas Lewis wrote:
>>
>> I'm working on a project and we are hoping to use protocol buffers for
>> messages between embedded and PC based applications.
>>
>> One issue I've immediately run into is protocol buffers only has 32 and 64
>> bit integers, I'm needing 16 and 8 bit integers for fields in the messages.
>> Has anyone been able to successfully add integer types to protocol buffers?
>> We are using C++ on the embedded side and Java on the PC side.
>>
>> Thanks,
>> Doug
>>
> --
> 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 [email protected].
> To post to this group, send email to [email protected].
> Visit this group at https://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 [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to