liblcf icon indicating copy to clipboard operation
liblcf copied to clipboard

Kaitai Struct for LCF

Open 0x4E69676874466F78 opened this issue 6 years ago • 2 comments

Hi guys. Do you know about Kaitai Struct? http://kaitai.io/ It can generate c++ code from declarative format ksy (YAML). For example: http://formats.kaitai.io/ This can simplify maintenance and reduce errors. It even has visualization: https://github.com/kaitai-io/kaitai_struct_webide Compilation available in other languages (you can give the opportunity to work with formats in other languages).

0x4E69676874466F78 avatar Oct 09 '19 13:10 0x4E69676874466F78

Hi NightFox, thanks for the suggestion. Yes, it is known. I did time ago a .ksy for the XYZ image format, which is pretty simple. It worked nicely from command line tools but the Kaitai Web IDE has a bug not allowing to display the structure on it.

About the LCF structure, it could be useful for visualization where liblcf is not suitable, but using SWIG is a possible alternative for users using other programming languages.

A suggestion for contributions (they are very welcome) is by providing a patch for the Python based liblcf code generator and create .ksy declarative code based on Jinja2 templates, like we do for C++ generation, so if we make changes in chunks in CSV files, updating C++ code and any other is simpler.

fdelapena avatar Oct 09 '19 15:10 fdelapena

https://github.com/kaitai-io/kaitai_struct_formats/issues/236

KOLANICH avatar Nov 03 '19 20:11 KOLANICH