4 ms·
Protocol Buffers and Kaitai structs solve different problems, although they both deal with serialized data. With a protobuf, you don't really care about how the
by karlding 6y ago
Protocol Buffers and Kaitai structs solve different problems, although they both deal with serialized data. With a protobuf, you don't really care about how the data that you're serializing into the binary buffer is represented in the binary format. All you care about is that your data can be serialized and deserialized. Conversely, Kaitai allows you to control and specify the representation of the serialized data. This allows you to specify arbitrary formats (like image formats, for example).
Essentially you start with the serialization format instead of starting with the deserialized data (or like how the title of this submission says, "describe the structure of data"). As such, you can somewhat describe protobufs [0] using Kaitai structs, but the converse is not necessarily true.
There's actually a section under their FAQ [1] with a more in-depth response to this.
[0] https://formats.kaitai.io/google_protobuf/index.html https://formats.kaitai.io/google_protobuf/index.html
[1] https://doc.kaitai.io/faq.html#vs-protobuf https://doc.kaitai.io/faq.html#vs-protobuf