3 ms·
It's really too bad that there isn't a standard binary data structure format that we could process the same way we process stdin/stdout/stderr. Stumbled onto B
by zackmorris 12y ago
It's really too bad that there isn't a standard binary data structure format that we could process the same way we process stdin/stdout/stderr. Stumbled onto BSON the other day, which allows MongoDB to store binary JSON:
http://bsonspec.org http://bsonspec.org
http://en.wikipedia.org/wiki/BSON http://en.wikipedia.org/wiki/BSON
The main issue is that it doesn’t have arbitrary precision like, say, OpenTNL. That could probably be overcome somewhat with compressed streams.
It would also be nice to have a leaf-first format, or hints for depth-first or breadth-first traversal so that the stream could be processed as it’s received.
These are really old ideas so maybe I just haven’t stumbled onto a solution.
- userbinator 12y agoASN.1 DER? It's very compact and length-delimited.
- vog 12y agoThat was my first thought, too. Why do people forget about good old standards? There are so many attempts to do Binary JSON, Binary XML, Binary YaML, ... whatever. Followed by language-specific serialization formats like Python's Pickle, php-serialize, and so on. What a huge mess! If any binary format wants to become a universal competitor to those, it: - should offer some big advantages over the already established ASN.1, and - should be significantly smaller and faster than compression of human-readable formats (e.g. json+gzip or xml+xz)