-
Notifications
You must be signed in to change notification settings - Fork 198
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to stop a sequence when certain contion is matched? #445
Comments
Just use seq:
# ...
- id: more_blocks
type: event_block
repeat: until
repeat-until: _.is_terminator
type:
event_block:
seq:
- id: param1
type: u4
- id: param2
type: u4
- id: params_rest
type: u4
repeat: expr
repeat-expr: _root.ev_size - 2
if: not is_terminator
instances:
is_terminator:
value: param1 == 0xffffffff and param2 == 0xffffffff |
Yeah, right ;) Would fix now. |
kmax_event.zip |
@exaos, how big is your data file (in comparison to the amount of memory on your PC)? Your program is going to try to read all of the data into memory.... I ran into this problem in my project, and had various problems with Python and memory consumption. I ended up implementing the |
@webbnh |
As the attached picture, a sequence might stop at certain condition, e.g., when encountering some magic or next block is not the same data type. How to depict this kind of conditional reading? How about this:
The text was updated successfully, but these errors were encountered: