I have a protocol buffer setting as follows:
[ProtoContract]
Foo
{
[ProtoMember(1)]
Bar[] Bars;
}
One byte receives the encoding in a byte buffer of 67 bytes. That sounds right, because I know that there is only a 64-byte array in the bar, and then there are 3 bytes for the length prefix.
However, when I encode Foo with an array of 20 bars, it takes 1362 bytes. 20 * 67 - 1340, so there are 22 bytes of service data for encrypting the array!
Why does it take up so much space? And is there anything I can do to reduce it?
source
share