Recently, the latest version of Kaitai Struct 0.9 was released — a descriptive language and toolkit for parsing various binary formats (such as network packets, image/audio/video files, databases, archives, containers, etc.). Despite its seemingly trivial version number of 0.9, this is a major release that includes developments from the past 2.5 years. During this time, the language has grown into a whole family of projects:
- a compiler that allows generating the source code of a parser in multiple programming languages (C++, C#, Construct, Go, Java, JavaScript, Lua, Nim, Perl, PHP, Python, Ruby) from a format specification file (.ksy), as well as diagrams in GraphViz format and human-readable format specifications in HTML;
- tools for convenient specification development with simultaneous visual control: Web IDE, console visualizer, plugin for Visual Studio Code, Hobbits, Veles, plugin for Hiew, plugin for Binary Ninja;
- modules for integrating Kaitai Struct into the build process for Maven, for Gradle, for Python, for JavaScript/WebPack
- library of formats, now containing 156 descriptions in this release (and another 78 formats are in the pull request review process).
- library of plug-in compression algorithms Kaitai Compress
- module for FUSE — Kaitai FS, allowing a file to be mounted as a file system using a ksy description of its format
Language recognized by GitHub and is currently used in more than 400 free/open source projects for parsing various exotic data formats, ranging from reverse engineering proprietary game data files, to parsing communication protocols of satellites..
Key innovations in language 0.9 include:
- support for new target languages (Python through the Construct library, Nim, HTML documentation generation)
- full support for modern C++ (smart pointers, no need for manual memory management, fixing all known memory leak variants)
- support for addressing nested types via syntax like foo::bar::baz
- support for validating read data according to specified conditions (valid)
- calculating sizes of static data structures in bytes and bits (sizeof and bitsizeof operators)
- formal description of the language in the form of JSON schema, from which documentation is now generated
Source: linux.org.ru

