python读写protobuf
来源:互联网 发布:火车票网上订票软件 编辑:程序博客网 时间:2024/06/06 03:01
From: http://blog.sina.com.cn/s/blog_7575a6190101u86f.html
官方protobuf定义
https://code.google.com/p/protobuf/
https://developers.google.com/protocol-buffers/docs/pythontutorial
http://blog.csdn.net/love_newzai/article/details/6906459
wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.bz2
tar -vxjf protobuf-2.5.0.tar.bz2
cd protobuf-2.5.0
./configure --prefix=/home/admin/mypython/
make ; make install
struct_oss_pb.proto
{
};
message
{
};
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Protobuf定义了一套基本数据类型。几乎都可以映射到C++\Java等语言的基础数据类型.
protobuf 数据类型
描述
打包
C++语言映射
bool
布尔类型
1字节
bool
double
64位浮点数
N
double
float
32为浮点数
N
float
int32
32位整数、
N
int
uint32
无符号32位整数
N
unsigned int
int64
64位整数
N
__int64
uint64
64为无符号整
N
unsigned __int64
sint32
32位整数,处理负数效率更高
N
int32
sing64
64位整数 处理负数效率更高
N
__int64
fixed32
32位无符号整数
4
unsigned int32
fixed64
64位无符号整数
8
unsigned __int64
sfixed32
32位整数、能以更高的效率处理负数
4
unsigned int32
sfixed64
64为整数
8
unsigned __int64
string
只能处理 ASCII字符
N
std::string
bytes
用于处理多字节的语言字符、如中文
N
std::string
enum
可以包含一个用户自定义的枚举类型uint32
N(uint32)
enum
message
可以包含一个用户自定义的消息类型
N
object of class
- python读写protobuf
- python读写protobuf
- python读写protobuf
- 【Python】用 Protobuf 读写数据
- python操作protobuf
- python使用protobuf
- protobuf python api
- python版protobuf安装
- python下使用protobuf
- Python操作protobuf示例
- Python中protobuf
- 安装protobuf Python支持
- python使用protobuf
- python protobuf 实践
- python 如何使用 protobuf
- python中使用protobuf
- Protobuf在Python中的使用
- windows下python protobuf 安装
- 对于AlamoFire几点思考
- JBPM4"公司请假流程"实例步骤
- Cocos2d-x 3.x ClippingNode裁剪节点
- Myeclipse 安装Aptana插件
- MANUAL segment management on tablespace for AUD$ and FGA_LOG$ could lead to database hanging with gc
- python读写protobuf
- 利用Mahout实现在Hadoop上运行K-Means算法
- PAT 1103. Integer Factorization (30)
- Java使用Apache CXF开发Web Service
- Hibernate容器映射技术
- OS X中多PHP环境与Nginx配置问题
- 如何分清JSON解析什么时候该用JSONObject,什么时候该用JSONArray。
- maven-compiler-plugin 指定JDK版本和编码
- 获取当前控制器