Is there a Java equivalent to the Python build library? I want to write "structs" as follows:
message = Struct("message",
UBInt8("protocol"),
UBInt16("length"),
MetaField("data", lambda ctx: ctx["length"])
)
It does not have to be a library with some kind of abstraction using the Java language. I mean, it could be a “portable” format with an API for analyzing documents. I think this might work with XML, but it would be much uglier.
I understand that I can just interact with Python, but I do not want to do this.
source
share