▲ | naikrovek 5 days ago | |
TLV style binary formats are all you need. The “Type” in that acronym is a 32-bit number which you can use to version all of your stuff so that files are backwards compatible. Software that reads these should read all versions of a particular type and write only the latest version. Code for TLV is easy to write and to read, which makes viewing programs easy. TLV data is fast for computers to write and to read. Protobuf is overused because people are fucking scared to death to write binary data. They don’t trust themselves to do it, which is just nonsense to me. It’s easy. It’s reliable. It’s fast. | ||
▲ | oftenwrong 5 days ago | parent [-] | |
Protobuf is typically serialised using a TLV-style encoding. https://protobuf.dev/programming-guides/encoding/ A major value of protobuf is in its ecosystem of tools (codegen, lint, etc); it's not only an encoding. And you don't generally have to build or maintain any of it yourself, since it already exists and has significant industry investment. |