AAtsushi's Blog
Python

Trying Out Protocol Buffers

→ 日本語版を読む

This time I'll try out Protocol Buffers (Protobuf) using these references:

tech.raksul.com

nansystem.com

developers.google.com

When researching Protobuf, MessagePack also comes up frequently.

Both MessagePack and Protobuf have serialization/deserialization functionality, which is probably why they're compared.

MessagePack emphasizes serialization/deserialization speed.

Protobuf, on the other hand, is apparently slower than MessagePack at serialization/deserialization, but allows you to describe and share data structures. In other words, like XML or JSON, you can write schemas.

uqichi.hatenablog.com

frsyuki.hatenablog.com

This time, I'll look into how to write schemas in Protobuf and how to serialize/deserialize.

Installing Protobuf on Windows

First, install it.

qiita.com

>protoc --version
libprotoc 3.21.9

>pip install protobuf
>pip list
Package                  Version
------------------------ -