使用google protobuf可以高效地对数据进行序列化和反序列化,使用方法方便简单
1.protobuf安装
安装步骤参考
安装依赖项:
sudo apt-get install autoconf automake libtool curl make g++ unzip
使用源码安装:
根据需要下载最新版本: protobuf
编译安装(我安装的是C++版本):
$ ./configure
$ make
$ make check
$ sudo make install
$ sudo ldconfig # refresh shared library cache.