What to put in a binary data file's header

前端 未结 12 2313
隐瞒了意图╮
隐瞒了意图╮ 2021-02-06 01:52

I have a simulation that reads large binary data files that we create (10s to 100s of GB). We use binary for speed reasons. These files are system dependent, converted from te

12条回答
  •  忘掉有多难
    2021-02-06 01:56

    In addition to whatever information you need for schema versioning, add details that may be of value if you are troubleshooting an issue. For example:

    • timestamps of when the file was created and update (if applicable).
    • the version string from the build (ideally you have a version string that is auto-incremented on every 'official' build ... this is different to the file schema version).
    • the name of the system creating the file, and maybe other statistics that are relevant to your app

    We find this is very useful (a) in getting information we would otherwise have to ask the customer to provide and (b) getting correct information -- it is amazing how many customers report they are running a different version of the software to what the data claims!

提交回复
热议问题