In Protobuf, types that are considered simple and that are provided by Protobuf out of the box are called scalar types. We can use 15 of such types, as listed here:
• int32
• int64
• uint32
• uint64
• sint32
• sint64
• fixed32 (unsigned, cannot store negative numbers)
• fixed64 (unsigned, cannot store negative numbers)
• sfixed32 (signed, can store negative numbers)
• sfixed64 (signed, can store negative numbers)
• double
• float
• string
• bytes
• bool
We want to make categories that are related to the Protobuf serialization algorithms. In total, we have three: fixed-size numbers, variable-size integers (varints), and length-delimited types. Here is a table with each category populated:
标签:store,Protobuf,negative,Scalar,Types,size,types,numbers From: https://www.cnblogs.com/zhangzhihui/p/18117975