Depends, but in many cases yes - as long as there is an indicator of the format to follow, it can handle variable length/"union"-type structures.
> what if there is change of structure at runtime? Can it handle it?
Probably not unless you're using Java (iirc the compiler uses the JVM).
You probably want a binary parser combinator/pickling library to do what you're thinking.
Depends, but in many cases yes - as long as there is an indicator of the format to follow, it can handle variable length/"union"-type structures.
> what if there is change of structure at runtime? Can it handle it?
Probably not unless you're using Java (iirc the compiler uses the JVM).
You probably want a binary parser combinator/pickling library to do what you're thinking.