2

I'm analysing an undocumented file format. Is there a standard documentation format for file formats I can write up? Something of this level of complexity and detail? What I have in my mind is,

!Global: Encoded in ASCII (unless specified otherwise)
Address: 0x12345670 - metadata, until the delimiter of "|"
Address: 0x12345670+, after delimiter of "|" - media container
...
Address: 0x23456780 - 32-bit pointer to the splash image
etc etc

The closest I could find is: creating your own syntax files in Vim (which is rather simple and editors-oriented, so the users could edit files with comfort) and TrID headers (which are limited to the headers only)

1
  • 1
    One thing that comes to mind is that you could use the Yara syntax to "document" (more like formalize) the description of the file format. Another option would be the C-like syntax used by 010 Editor to describe how to parse (and display) the file format. (And there are possibly many more such formats out there.) Yara is probably the more sustainable method because it's FLOSS and you could continue to maintain it even if the upstream ends up abandoning it. TrID would likely be similar to libmagic(3) in scope ...
    – 0xC0000022L
    Jan 17 '20 at 11:12
2

Kaitai use own format and has a good library, you can try it.

Web Ide for review: https://ide.kaitai.io/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.