You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When parsing/serializing a buffer, I need to dynamically determine the length of the value field in a structure based on certain bits in the flags bitmask. For example:
If a specific bit (e.g., 0x08) is set in flags, parse value as uint8
Otherwise, parse value as uint16
Current Code Example
Currently, I’m using the restructure library with the following code:
This approach is limited since it requires manually determining the structure type based on flags. I would prefer a more dynamic way to define this directly within the restructure structure, allowing flags to control the size of value without extra conditionals.
The text was updated successfully, but these errors were encountered:
Description
When parsing/serializing a buffer, I need to dynamically determine the length of the value field in a structure based on certain bits in the flags bitmask. For example:
Current Code Example
Currently, I’m using the restructure library with the following code:
Problem
This approach is limited since it requires manually determining the structure type based on flags. I would prefer a more dynamic way to define this directly within the restructure structure, allowing flags to control the size of value without extra conditionals.
The text was updated successfully, but these errors were encountered: