command
Version:
v0.0.0-...-f10d331
Opens a new window with list of versions in this module.
Published: Dec 8, 2023
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
测试pb的二进制的字节大小
我们对于map有两种处理办法,一种是直接用protobuf的map,还有一个是在服务器上把map里面数据转换到string,再放入protobuf中
。这个实验是对比一下两个方式来存数据,protobuf转换到二进制数据的时候的字节大小
运行结果
itemMap的大小 |
resMap1的大小 |
resMap2的大小 |
1 |
9 |
8 |
3 |
21 |
22 |
5 |
33 |
36 |
10 |
65 |
71 |
300 |
2788 |
2411 |
1000 |
9790 |
8711 |
可以看出这个大小,在原始数据不一样的时候,二进制的大小也不一样。
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Package pb is a generated protocol buffer package.
|
Package pb is a generated protocol buffer package. |
Click to show internal directories.
Click to hide internal directories.