Python
Trying Out Protocol Buffers
→ 日本語版を読むThis time I'll try out Protocol Buffers (Protobuf) using these references:
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.
This time, I'll look into how to write schemas in Protobuf and how to serialize/deserialize.
Installing Protobuf on Windows
First, install it.
>protoc --version
libprotoc 3.21.9
>pip install protobuf
>pip list
Package Version
------------------------ -