查看“Protobuf”的源代码
←
Protobuf
跳转至:
导航
、
搜索
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
=== Protobuf是什么 === Protobuf实际是一套类似Json或者XML的数据传输格式和规范,用于不同应用或进程之间进行通信时使用。通信时所传递的信息是通过Protobuf定义的message数据结构进行打包,然后编译成二进制的码流再进行传输或者存储。 === Protobuf的优点 === 相比较而言,Protobuf有如下优点: * 足够简单 * 序列化后体积很小:消息大小只需要XML的1/10 ~ 1/3 * 解析速度快:解析速度比XML快20 ~ 100倍 * 多语言支持 * 更好的兼容性,Protobuf设计的一个原则就是要能够很好的支持向下或向上兼容 === protobuf-net === Protobuf的早期版本不支持C#?可以借助protobuf-net protobuf-net is a contract based serializer for .NET code, that happens to write data in the "protocol buffers" serialization format engineered by Google. The API, however, is very different to Google's, and follows typical .NET patterns (it is broadly comparable, in usage, to XmlSerializer, DataContractSerializer, etc). It should work for most .NET languages that write standard types and can use attributes. github地址:https://github.com/mgravell/protobuf-net <pre> Install-Package protobuf-net </pre> === ProtoGen === CLI tool to parse protobuf .proto file to C#, based on protobuf-net, also works on Windows/Mac/Linux. * 官网:https://github.com/floatinghotpot/protogen === 参考资料 === * https://www.cnblogs.com/Leo_wl/p/7126321.html * https://www.cnblogs.com/liuxiaoji/p/9517635.html * https://www.jianshu.com/p/f2e8846a296d * https://www.cnblogs.com/Leo_wl/p/7126321.html * [https://www.jianshu.com/p/48c71e7359d3 VS2017 C# 开发环境下 Protobuf 安装 - 简书]
返回至
Protobuf
。
导航菜单
个人工具
创建账户
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息
浙ICP备18055689号