riteshtijoriwala / protostuff

Automatically exported from code.google.com/p/protostuff
Apache License 2.0
0 stars 0 forks source link

When the varint of large strings (2kb or more) are serialized, unnecessary bytes are written #133

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
A 2kb string previously needed 3 bytes for its varint.

Now anything under 16kb will only need 2 bytes.

This is a bug that was overlooked but doesn't have major side effects because 
of the way varint encoding works..

To be exact, if the string's size is:
>= 52488, 2 extra bytes are written.
>= 2048, 1 extra byte is written.

Original issue reported on code.google.com by david.yu...@gmail.com on 29 Aug 2012 at 6:54

GoogleCodeExporter commented 8 years ago
fixed @ rev 1549

Original comment by david.yu...@gmail.com on 29 Aug 2012 at 7:22