3 ms·
At this point, just don't design file format. Use flatbuffers. 1. It has good forward / backward compatibility stories; 2. Schema is your file format document
by liuliu 5y ago
At this point, just don't design file format. Use flatbuffers.
1. It has good forward / backward compatibility stories;
2. Schema is your file format documentation;
3. Don't need to decode every parts;
4. Can skip for unknowns (if you use union type);
5. Many language bindings.
The only downside, and this is a big one: validate a flatbuffers payload method doesn't have nearly as much language coverage as the encode / decode methods. (i.e. C++ has it, but a lot of other languages don't have validate method implemented).
Case study - Apache Arrow uses flatbuffers to persist its metadata: https://github.com/apache/arrow/tree/master/format https://github.com/apache/arrow/tree/master/format