title: What's the best way to serialize data in a language-independent binary format?
body: <p>I'm looking into a mechanism for serialize data to be passed over a socket or shared-memory in a language-independent mechanism.  I'm reluctant to use XML since this data is going to be very structured, and encoding/decoding speed is vital.  Having a good C API that's liberally licensed is important, but ideally there should be support for a ton of other languages.  I've looked at <a href="http://code.google.com/apis/protocolbuffers/" rel="noreferrer">google's protocol buffers</a> and <a href="http://en.wikipedia.org/wiki/ASN.1" rel="noreferrer">ASN.1</a>.  Am I on the right track?  Is there something better?  Should I just implement my own packed structure and not look for some standard?</p>