2015-03-07 wcdj
摘要:本文介绍在C/C++中如何使用MessagePack的方法。
官方是这样介绍MessagePack的:
MessagePack is an efficient binary serialization format. It lets you exchange data among multiple languages like JSON. But it's faster and smaller. Small integers are encoded into a single byte, and typical short strings require only one extra byte in addition to the strings themselves.
在OS X 10.10.1环境下使用msgpack-c的方法如下:
1 msgpack for c
(1) 下载msgpack和编译
$ wget http://msgpack.org/releases/cpp/msgpack-0.5.5.tar.gz $ tar zxvf msgpack-0.5.5.tar.gz $ cd msgpack-0.5.5 $ ./configure $ make $ sudo make install
(2) 测试代码
https://github.com/gerryyang/mac-utils/tree/master/tools/msgpack/src/c
2 msgpack for cplusplus
测试代码
https://github.com/gerryyang/mac-utils/tree/master/tools/msgpack/src/cplusplus
C/C++中使用MessagePack的指南

本文详细介绍了在OS X 10.10.1环境下C和C++中使用MessagePack库的步骤,包括下载、编译以及提供测试代码链接。
9793

被折叠的 条评论
为什么被折叠?



