You say "209 byte size" - using what measure is it 209 bytes? And what is the data? The payload size in protobuf often depends on the specific data, for example:
- for any fields: whether it is the default / unset value, vs whether it is a non-detault / explicitly set value, can change whether the field is serialized *at all* - different values can take different sizes; for string data, we're talking about the UTF8 length; for integer data, we can usually think of the data as "7 bits useful data per byte", so a small integer might take one or two bytes, but a very large integer might take 5, 7, whatever bytes (negatives take more explaining and nuance) - the field header size depends on the magnitude of the field number; field 7 takes 1 byte, but field 42 takes 2 bytes for the header, etc For 50 fields, assuming we number them 1-50 and all have explicit values and are sent, we're talking about 85 bytes just for the field headers. If they're all small-medium integer values, maybe another 100 bytes for the values, so round up: maybe 200 bytes. If we presume that maybe half the fields don't have explicit values, maybe half that to 100. If the data is strings or sub-objects, it'll be bigger. The best thing to do for a better answer is to test it using realistic data for your scenario, and simply measure it. On Sun, 30 Jan 2022, 10:10 Rishabh Unikrishanan, <[email protected]> wrote: > An estimation,approximation ,docs or any additional resources would be > helpful.Thanks. > > -- > 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 view this discussion on the web visit > https://groups.google.com/d/msgid/protobuf/575d19c7-0d5e-4b86-bdec-e6a5a21d4d6cn%40googlegroups.com > <https://groups.google.com/d/msgid/protobuf/575d19c7-0d5e-4b86-bdec-e6a5a21d4d6cn%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/protobuf/CAF95VAyMQc9QzRAvUR6DMVpZvC3P652A6k8w9t9S%2BJVHdY5iTg%40mail.gmail.com.
