Kaitai Struct is a [[GPLv3]] licensed binary data parser generator written in [[Scala]]. - [Website](https://kaitai.io/) - [Source](https://github.com/kaitai-io/kaitai_struct) - [Documentation](https://doc.kaitai.io/user_guide.html) > Kaitai Struct is a declarative language used to describe various binary data structures, laid out in files or in memory: i.e. binary file formats, network stream packet formats, etc. \- official website # Notability # Philosophy # Platform Support ## Export Languages While the compiler itself is written in [[Scala]], it exports parsers (library plus configuration) to several other languages including: - [[C++]] - [[C Sharp|C#]] - [[Go]] - [[Java]] - [[Javascript]] - [[Lua]] - [[Nim]] - [[Perl]] - [[PHP]] - [[Python]] - [[Ruby]] - [[Rust]] - [[Zig]] # Features > The main idea is that a particular format is described in Kaitai Struct language (`.ksy` file) and then can be compiled with `ksc` into source files in one of the supported programming languages. These modules will include a generated code for a parser that can read the described data structure from a file or stream and give access to it in a nice, easy-to-comprehend API. \- official website ## Format Gallery Has a huge library[^1] of format specifications it can use out of the box. - [[6502]] machine code - https://formats.kaitai.io/code_6502/ (essentially a programmatic disassembler) # Tips # Resources See also: - [[ImHex]] (hex editor with built-in node-based binary data processor) - [[GNU Poke]] - https://www.jemarch.net/poke - [[fq - binary query utility]] - [[DFDL]] - https://ogf.org/ogf/doku.php/standards/dfdl/dfdl (nightmare XML-based format) # References [^1]: https://formats.kaitai.io/