Parsing CString array with given total length #14
-
Hi, thanks for the great library! I'm struggling with understanding how to handle the following case: I need to parse an array of null-terminated example: @struct
class ExampleCStringArray:
string_array_length_bytes: uint8
string_array: CString[???] # How to parse this array?
some_other_data_that_may_look_like_a_string: ... Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hi @dougsm, if I understand your case correctly you want something similar to this: Chaining The structure would then look like this:
This code will create a new temporary parsing stream for the amount of N next bytes and will apply greedy parsing only within that new stream. |
Beta Was this translation helpful? Give feedback.
Hi @dougsm, if I understand your case correctly you want something similar to this: Chaining
The structure would then look like this:
This code will create a new temporary parsing stream for the amount of N next bytes and will apply greedy parsing only within that new stream.