It may make sense to rewrite the specs defining binary structures here from pseudocode into Kaitai Struct
This would allow to automatically generate parsers for them for multiple languages.
Until you opened this issue I was unaware of Kaitai. Thanks for pointing it out to me. I took a look at the web site and also at the Kaitai definition for PNG. My conclusions are:
- I would like to provide a Kaitai struct for .ktx2.
- It is more complicated than I have time to learn.
- It is too complex (maybe just long-winded) for me to want to replace the short pseudo-code at the start of the spec. with it.
I would welcome a contribution of a .ktx2 definition.
I am curious about the intended meaning of kaitai. The kanji character used on the web page is 力 (ryoku) which means power. However none of the homonyms of "kaitai" that I am aware of use 力 and all have fairly negative meanings, e.g. demolish, coastal erosion, absconding with money. Maybe it doesn't come from Japanese even though it sounds like it.
I am curious about the intended meaning of kaitai.
I think they meant something like disassembly / dismantling.
I am curious about the intended meaning of kaitai. The kanji character used on the web page is 力 (ryoku) which means power. However none of the homonyms of "kaitai" that I am aware of use 力 and all have fairly negative meanings, e.g. demolish, coastal erosion, absconding with money. Maybe it doesn't come from Japanese even though it sounds like it.
It is named after https://en.wikipedia.org/wiki/Kaitai_Shinsho .
@KOLANICH can you provide a Kaitai struct for .ktx2?
armijnhemel has already partially implemented ktx1 in https://github.com/kaitai-io/kaitai_struct_formats/pull/547 , I can look into implementing ktx2 somewhen, but currently no ETA, since I'm currently busy (well, I'm almost always busy, it is even written in my GH profile that I'm extremily busy ⌛😉) and there are some specs I am going to implement (currently the one for safetensors is the first in my list and I have already started working on it).
Anyone can feel free to start working on it, just please make an announce about that.
Also: a prereq for working on any format parser is a suite of files that
- utilize every feature of the format
- small enough to be easily observed in a hex editor.
So it'd be nice to have such a suite, if it doesn't exist.
Also: a pre-req for working on any format parser is a suite of files that
Work is about to start that includes improving the test suite for KTX-Software. Something like this will emerge.