MessagePack is a binary-based efficient object serialization library. It enables to exchange structured objects between many languages like JSON. But unlike JSON, it is very fast and small.<p>Typical small integer (like flags or error code) is saved only in 1 byte, and typical short string only needs 1 byte except the length of the string itself
Why not just use Avro if you want a packed encoding system that's schema-bound, or Fudge if you want one that's schema free and self-describing?<p>Link to Avro: <a href="http://hadoop.apache.org/avro/" rel="nofollow">http://hadoop.apache.org/avro/</a>
Link to Fudge: <a href="http://www.fudgemsg.org/" rel="nofollow">http://www.fudgemsg.org/</a>
Couldn't do hyperlinks for some reason. Perhaps because I'm a moron.
I recommend ASN.1 PER over any of the myriad byte-aligned no-schema formats that waste bits on ranges of values and entire types you aren't sending. But this is better than some other formats I've seen.
I bet gzipped JSON compares favorably for larger objects, though, and has the advantage of not being a new protocol. The fact that it supports Haskell and Perl with proper hackagedb / cpan modules is nice, however. Very rare for web 2.0 stuff.
Very interesting, though I'll take more of a look later on. The speed test does seem a little contrived, as it's for one case, and it looks [briefly] like some of the gains are due to greater specificity of primitive types.