Updates:
Status: Fixed
Owner: xiaof...@google.com
Labels: FixedIn-2.6.1
Comment #1 on issue 675 by xiaof...@google.com: memory leak
https://code.google.com/p/protobuf/issues/detail?id=675
Fixed in:
1.if a int value is -1,then through varint 128 serialze is 10 bytes.
2. a bool true is none 0,and false is 0,but it cost 1 byte .
I hope -1 just cost 1 byte,and bool cost no byte.
and it can cost less byte when serialize
and I suggest change wire type:
0(000) --- positive varint
1(001) ---
On Sun, Oct 19, 2014 at 6:58 AM, Aijing Sun aijings...@gmail.com wrote:
1.if a int value is -1,then through varint 128 serialze is 10 bytes.
2. a bool true is none 0,and false is 0,but it cost 1 byte .
I hope -1 just cost 1 byte,and bool cost no byte.
and it can cost less byte when serialize
I believe you're looking for zigzag encoding wrt negatives. If instead
of int32 you call it sint32, that should get a much better encoding
for small negative values.
On Sun, Oct 19, 2014 at 9:58 AM, Aijing Sun aijings...@gmail.com wrote:
1.if a int value is -1,then through varint 128 serialze is