TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Simple Binary Encoding

48 pointsby dekayedabout 11 years ago

3 comments

jamesaguilarabout 11 years ago
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 未加载
habermanabout 11 years ago
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 未加载
ubercode5about 11 years ago
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 未加载