所以在我见过的许多基准测试中,protobuf-net 远远领先于 BinaryFormatter: - http://theburningmonk.com/2011/08/performance-test-binaryformatter-vs-protobuf-net/ - https://code.google.com/p/protobuf-net/wiki/Performance
这让我想到了一个问题:如果 protobuf-net 可用,您为什么要使用 BinaryFormatter?
我读过一些关于 BinaryFormatter 存储类型元数据的内容,这是 protobuf 不会做的。你能给我一个我想要存储类型元数据的示例场景吗?
最佳答案
我目前正在努力使用 protobuf-net 来序列化 Dictionary<string, object>
类型的对象.我读到的是这是不可能的,所以我想在这种情况下人们更喜欢 BinaryFormatter。
关于c# - 使用 BinaryFormatter 而不是 protobuf-net 的原因,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29355149/