http://bsonspec.org/spec.html
一、
document ::= int32 e_list "\x00" BSON Document. int32 is the total number of bytes comprising the document.
文档的开始处用4个字节(32位)存储整个文档的字节大小。然后是文档。最后以\x00(0000 0000)结束。
二、
The document for an array is a normal BSON document with integer values for the keys, starting with 0 and continuing sequentially. For example, the array ['red', 'blue'] would be encoded as the document {'0': 'red', '1': 'blue'}. The keys must be in ascending numerical order.
bson格式中的数组是用数字做key的一个文档,从0开始的。例如 ['red', 'blue']被存储成{'0': 'red', '1': 'blue'}。key必须是升序的。