kaitai-io / kaitai_struct

Kaitai Struct: declarative language to generate binary data parsers in C++ / C# / Go / Java / JavaScript / Lua / Nim / Perl / PHP / Python / Ruby
https://kaitai.io
3.96k stars 192 forks source link

Include kaitai primitive type information in `_debug` #898

Open hello-adam opened 3 years ago

hello-adam commented 3 years ago

When a spec with a primitive type (e.g. u*, f*, s*be, etc.) is parsed, that type data is not plainly available in the KaitaiStruct or its _debug data (at least not in Python). It would be nice to not need to infer the primitive type from a combination of the Python type, byte range, value, and actual data. One example case: Mahlet-Inc/hobbits#110

KOLANICH commented 3 years ago

896