Closed peterdk closed 1 month ago
I don't have time to give a full answer/test ideas. I however have a branch that adds Seek
support, which should give you the ability to "peek" around while reading.
@peterdk Seek
has been added on master, lmk if you have more questions or use cases in which we didn't resolve
So I was a bit surprised by the sudden removal of
deku:rest
anddeku:input
.Some usecases I can switch over to the
Reader
part, and that I like. But... for some cases I need to know the full length of the input file, be able to peek into it, and generally read theinput
more then I return in withrest
.For example, I use Deku for reading heavily obfuscated/protected data structures. This means I have to deal with for example a
That is not a problem normally, but some data I get is deliberately working around the old original C reader implementation loop holes, and I need to handle those.
For example normally I would get as input:
But the obfuscated one is:
Since it's taking advantage of that the original C implementation does not check count field, but (simplified) skips the count field and looks for 0 as terminator, I need to parse it as:
For that I had implemented
I am not sure how I could work around this with the new streaming setup. I would be helped if I at least could
peek()
into the stream without changing it's position, but can read the data.Any ideas?