Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在学习protobuf的实现。但是,有一点我无法理解。框架如何将子消息(对象)序列化为具有可变头部的缓冲区,即使有时它的长度真的很难弄清楚!将其序列化到其他地方并稍后将其复制到缓冲区中?
我能想到的至少有四种方法,只要它得到正确的答案,“哪个”是一个实现细节:
我已经在不同的时间实施了其中至少 3 种方式!