Welcome to the Monastery | |
PerlMonks |
Re: Faster way to parse binary streamby BrowserUk (Patriarch) |
on Jun 19, 2007 at 19:50 UTC ( [id://622091]=note: print w/replies, xml ) | Need Help?? |
If the entire string (after the first 'no of strings' byte) is made up length/string pairs, then (subject to using an unenbalmed version of Perl) let unpack take care of it. Ignore/skip the first byte and use the ()repeat pattern to deal with it. Eg:
If there is other stuff following the strings, then you'll need to unpack the first byte and then generate the pattern:
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
In Section
Seekers of Perl Wisdom
|
|