sprout42/StarStruct

Allow a length field to reference multiple other elements

sprout42 opened this issue · 0 comments

If a length field is a bytes element (added by #13), it might make sense for it to reference multiple following fields, up to ALL following fields. The reference string for a length field should be allowed to be a regex that searches for matches in all fields that come after the length field.

This would make the most sense to change after message validation is done by the fields, rather than the Message object (issue #15). Also, it might make the most sense to change after fields are allowed to be requested to be packed after one or more other fields in the message, so a length in bytes field could be packed after some list of other fields, and therefore it can be set to the correct actual number of bytes.