Thanks for the link! I did not known about the pack tutorial before.
The context for this problem is a table driven telegram decoder, which assumes,
it can split the packed telegram data structure into fields in one unpacking step.
The other structures have been simple enough but the last extension has been more complex with its prefixed repeat count.
hexcoder