I just discovered construct yesterday. Wow, great package!
I am parsing a binary file which has fixed length strings that are null terminated. Some of these seem to have garbage after the null termination.
I think the way to handle this is to make a Union of Padding, CString, or maybe Peek(CString), then Padding. Or maybe another way.
Is there a "best" way to handle this?
Also is there example of how to create new macro to encapsulate such things? I see
http://construct.readthedocs.org/en/latest/extending.html but this talks about creating an Adapter, not the macro which uses that adapter. I started looking at the code, but I think many here have the construct experience I am lacking and could quickly supply a code snippet.
Thanks in advance.