Re: [protobuf] Is there a method to not utilise the 3bit Tag so the full fixed32 is used.

2024-05-14 Thread Derek Perez
I don’t believe protobuf is what you wanna use if you need that level of
control.

On Sun, May 12, 2024 at 9:37 PM Jared Leendertz 
wrote:

> Hello, New to protocol buffer, tying to implement a read write from buffer
> that easily encodes and decodes messages types from a SISO standard. I
> noticed the https://protobuf.dev/programming-guides/encoding/#cheat-sheet
> encoding standard indicates that 3 bits are missing from the variables
> value range in each field on a message. If im implementing to a specific
> standard with fixed sizes is Protocol Buffer suitable? given a fixed32
> appears to be a 29bit field.
>
> I confirmed my worries as i was trying to set default values to 0x
> but would get the error Integer out of range.
>
> Should I be using something else or is there a configuration that allows
> me to have more control of the size of my variables and how i want to use
> them?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/b0bfac5f-c9e0-4364-8e69-12990b7bc11fn%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAD7-yfsnoR1e%2Bx4sD7cTtDEh79f2rmkoAbOe0ZAYBereCyX9nA%40mail.gmail.com.


Re: [protobuf] Is there a method to not utilise the 3bit Tag so the full fixed32 is used.

2024-05-13 Thread Marc Gravell
Without more context that is unanswerable. What target
language/runtime/framework? What target scenarios / encoding / wire format?
But in my experience: most libraries are opinionated and aimed at a
specific serialization scenario. If your scenario is different and no
library exists: it may be bespoke, and/or you might get to become the
missing library author.

Marc

On Mon, 13 May 2024 at 12:12, Jared Leendertz 
wrote:

> Understood, thanks for the explanation. Unfortunately, this makes protobuf
> not suitable. Any suggestions for open-source libraries that would help
> minimize serialization code?
>
> On Monday, May 13, 2024 at 3:52:56 PM UTC+10 Marc Gravell wrote:
>
>> A tag isn't on a value - it is part of the *field header* which is the
>> combination of field-number and wire-type ; a fixed32 *value* is 32 bits.
>>
>> The sizes of values aren't directly controllable by you; protobuf-net
>> isn't a general purpose binary descriptor format and cannot usually be used
>> to implement specific pre-existing standards that aren't related to
>> protobuf.
>>
>> On Mon, 13 May 2024, 05:37 Jared Leendertz,  wrote:
>>
>>> Hello, New to protocol buffer, tying to implement a read write from
>>> buffer that easily encodes and decodes messages types from a SISO standard.
>>> I noticed the
>>> https://protobuf.dev/programming-guides/encoding/#cheat-sheet
>>> encoding standard indicates that 3 bits are missing from the variables
>>> value range in each field on a message. If im implementing to a specific
>>> standard with fixed sizes is Protocol Buffer suitable? given a fixed32
>>> appears to be a 29bit field.
>>>
>>> I confirmed my worries as i was trying to set default values to
>>> 0x but would get the error Integer out of range.
>>>
>>> Should I be using something else or is there a configuration that allows
>>> me to have more control of the size of my variables and how i want to use
>>> them?
>>>
>>> --
>>> 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+u...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/protobuf/b0bfac5f-c9e0-4364-8e69-12990b7bc11fn%40googlegroups.com
>>> 
>>> .
>>>
>> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/e37be59b-da4d-4724-8ec9-53d5af15144an%40googlegroups.com
> 
> .
>


-- 
Regards,

Marc

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAF95VAzE7vDB%2B454Yieah2BZYgWaBu-UoNn7v-OfpM9nUiSeyA%40mail.gmail.com.


Re: [protobuf] Is there a method to not utilise the 3bit Tag so the full fixed32 is used.

2024-05-13 Thread Jared Leendertz
Understood, thanks for the explanation. Unfortunately, this makes protobuf 
not suitable. Any suggestions for open-source libraries that would help 
minimize serialization code?

On Monday, May 13, 2024 at 3:52:56 PM UTC+10 Marc Gravell wrote:

> A tag isn't on a value - it is part of the *field header* which is the 
> combination of field-number and wire-type ; a fixed32 *value* is 32 bits.
>
> The sizes of values aren't directly controllable by you; protobuf-net 
> isn't a general purpose binary descriptor format and cannot usually be used 
> to implement specific pre-existing standards that aren't related to 
> protobuf.
>
> On Mon, 13 May 2024, 05:37 Jared Leendertz,  wrote:
>
>> Hello, New to protocol buffer, tying to implement a read write from 
>> buffer that easily encodes and decodes messages types from a SISO standard. 
>> I noticed the 
>> https://protobuf.dev/programming-guides/encoding/#cheat-sheet
>> encoding standard indicates that 3 bits are missing from the variables 
>> value range in each field on a message. If im implementing to a specific 
>> standard with fixed sizes is Protocol Buffer suitable? given a fixed32 
>> appears to be a 29bit field.
>>
>> I confirmed my worries as i was trying to set default values to 
>> 0x but would get the error Integer out of range.
>>
>> Should I be using something else or is there a configuration that allows 
>> me to have more control of the size of my variables and how i want to use 
>> them?
>>
>> -- 
>> 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+u...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/protobuf/b0bfac5f-c9e0-4364-8e69-12990b7bc11fn%40googlegroups.com
>>  
>> 
>> .
>>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/e37be59b-da4d-4724-8ec9-53d5af15144an%40googlegroups.com.


Re: [protobuf] Is there a method to not utilise the 3bit Tag so the full fixed32 is used.

2024-05-12 Thread Marc Gravell
A tag isn't on a value - it is part of the *field header* which is the
combination of field-number and wire-type ; a fixed32 *value* is 32 bits.

The sizes of values aren't directly controllable by you; protobuf-net isn't
a general purpose binary descriptor format and cannot usually be used to
implement specific pre-existing standards that aren't related to protobuf.

On Mon, 13 May 2024, 05:37 Jared Leendertz, 
wrote:

> Hello, New to protocol buffer, tying to implement a read write from buffer
> that easily encodes and decodes messages types from a SISO standard. I
> noticed the https://protobuf.dev/programming-guides/encoding/#cheat-sheet
> encoding standard indicates that 3 bits are missing from the variables
> value range in each field on a message. If im implementing to a specific
> standard with fixed sizes is Protocol Buffer suitable? given a fixed32
> appears to be a 29bit field.
>
> I confirmed my worries as i was trying to set default values to 0x
> but would get the error Integer out of range.
>
> Should I be using something else or is there a configuration that allows
> me to have more control of the size of my variables and how i want to use
> them?
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/protobuf/b0bfac5f-c9e0-4364-8e69-12990b7bc11fn%40googlegroups.com
> 
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/protobuf/CAF95VAzTeFvsnNQgh6N6%3DfJqUDKTv4wHqfE9ynSV304mBqdJyw%40mail.gmail.com.