Performant Entity Serialization: BSON vs MessagePack (vs JSON)

后端 未结 6 1473
南方客
南方客 2020-12-04 04:57

Recently I\'ve found MessagePack, an alternative binary serialization format to Google\'s Protocol Buffers and JSON which also out

6条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-04 05:40

    Well,as the author said,MessagePack is originally designed for network communication while BSON is designed for storages.

    MessagePack is compact while BSON is verbose. MessagePack is meant to be space-efficient while BSON is designed for CURD (time-efficient).

    Most importantly, MessagePack's type system (prefix) follow Huffman encoding, here I drawed a Huffman tree of MessagePack(click link to see image):

提交回复
热议问题