TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Simple Binary Encoding

48 点作者 dekayed大约 11 年前

3 条评论

jamesaguilar大约 11 年前
Curious to see how this stacks up with other generic binary formats. Off the top of my head, protocol buffer can be made to have this kind of wire format (root fields in front, variable fields in the back), but I don't know if partial decoding or streaming decoding is possible, and it definitely requires some user effort to make it this way.
评论 #7701445 未加载
haberman大约 11 年前
This sounds very similar in concept to Cap&#x27;n Proto, and given how much hard-earned experience Kenton has and how much time he&#x27;s put into it, I&#x27;d put my bets on Cap&#x27;n Proto if you&#x27;re looking for something in this design space.<p>I haven&#x27;t looked at SBE in detail, but given the high-level description I expect it would have a similar set of trade-offs vs. Protocol Buffers as Cap&#x27;n Proto does: it will have unparalleled serialize&#x2F;deserialize performance (since they are basically no-ops), but sparse messages (where only a few of many defined fields are set) will be arbitrarily larger than protobufs, so a separate compression step will be necessary to be size-competitive, at which point some of the speed advantage is lost.
评论 #7702562 未加载
ubercode5大约 11 年前
I would be interested to see a binary size comparison along with the speed comparison. Is there a trade-off of speed for byte size?
评论 #7707568 未加载