シリアライズライブラリ

ソケット通信でデータを送受信するとき、ネットワークバイトオーダや構造体のパディングなどを考慮して、通信用バイト列に変換する必要がある。

 

自分でゴリゴリ作るより、便利そうなライブラリを探し、使うことにする。

 

  1. Google Protocol Buffers
  2. MessagePack
  3. Cereal

 

 

Google Protocol Buffers

developers.google.com

MessagePack

MessagePack: It's like JSON. but fast and small.

Cereal

cereal Docs - Main