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) --- negative  varint
2(010) ---- true
3(011) ---- false
4(100) ---- bit32
5(101) ---- bit64
6(110) ---- Length-delimited


 

-- 
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 post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/protobuf.
For more options, visit https://groups.google.com/d/optout.

Reply via email to