@dponyatov, following the links in the StackOverflow conversation you pointed out, I've found mentioned the Kaitai Struct (open source) tool:
[http://kaitai.io](http://kaitai.io) That seems a good solution, with YAML-like definitions — and, from what I understood, you'd only have to write/port Nim support for Kaitai once, and then it could be used anywhere. Right now, Nim is not officially supported, but I'm sure that they'd welcome a Nim adaptation to include Nim in the officially supported langs.
