我有一个 C++ 应用程序,它像这样使用 Google Protobuf 序列化一个结构
int len = mdd.ByteSize();
char* buf = (char *)malloc(len);
mdd.SerializeToArray(buf, len);
我想从 python 中反序列化:
import marketdata_pb2
...
md = marketdata_pb2.MarketDataDepth()
#what goes here? I don't see a marketdata_pb2.parsefromarray()