Skip to content
sergeych edited this page Dec 20, 2012 · 2 revisions

Welcome to the boss_protocol wiki!

The protocol was intended as fast, cross-platform and space-effective replacement for object storage protolos. It is extremely effective in comparison to JSON amd BSON, and is stramable. An it is typed - so ints are ints, not strings, bools are not ints and so on.

The trick behind the scenes is that protocol uses bit-packing for header and values, so small ints, consts like 0.0, -1.0, 1.0, true and false are packed in just one byte, and short string gets only one extra byte to it. Still, protocol can store unlimited size integers, texts and binary data. Unlimited floats are reserved, though.

Arrays and hashes have unlimited size too and object trees are preserved. Repeating data are cached. Object may be compressed by request^ compression method will depend on data size, either no compression, zlib or bzip2, and decompressor transparently decompress it.

There are implementation in C and Python but these are parts of other systems, but can be extracted. Please leave me a plea if you need it that bad ;)

Clone this wiki locally