We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ce733be commit d4e3a2cCopy full SHA for d4e3a2c
1 file changed
_posts/2026-01-18-protobuf-packed-encoding.md
@@ -37,7 +37,7 @@ Protocol Buffers(简称 Protobuf)是 Google 开发的一种高效的数据
37
38
| 特性 | 不使用 packed | 使用 packed=true |
39
|------|:-------------:|:----------------:|
40
-| **编码方式** | 每个元素单独编码,每个值都带 tag+type+value | 所有元素打包成连续字节块,只有一个 tag+length |
+| **编码方式** | 每个元素单独编码,每个值都带 tag+type+value | 所有元素打包成连续字节块,仅需一个 tag+length 头部,后跟所有 value |
41
| **Wire Type** | Varint (0) | Length-delimited (2) |
42
| **Tag 开销** | 100 × 1 = **100 字节** | 1 字节 |
43
| **Length 开销** | 无 | 2 字节 |
0 commit comments