Skip to content

Language reference

Mikhail Yakshin edited this page Feb 24, 2016 · 4 revisions

Purpose

Kaitai Struct is a DSL (domain-specific language), designed to describe binary data structures in human- and machine-readable way. Description of certain structure ("format") can be written once and then translated using a compiler into a source code for supported programming languages — and then used from any program in that language.

.ksy files

Kaitai Struct data structure (format) descriptions are written as simple YAML files and are usually saved using .ksy extension to differentiate them from the rest of .yaml files.

Every .ksy file MUST be a map of strings (keys) to some values. File has only one unique key on top level, in all other respects "file" on the top level represents a class, a thus can use all the keys available for class definition.

meta

meta key is a map of string to objects that defines various meta-information about the current file, assigns some default and processing directives.

id

Clone this wiki locally