|Perl Monk, Perl Meditation|
Searching binary databy Shendal (Hermit)
|on Mar 14, 2002 at 17:03 UTC||Need Help??|
Shendal has asked for the wisdom of the Perl Monks concerning the following question:
Given a binary file, I want to search for a section of content, and return the next few bytes in the file. Currently, I am using something like this code:
This is unbearably slow for large files. I'd like to search without having to convert to/from hex. Any ideas on how to accomplish this, or another way to speed up the parsing?
BTW, the searching section of the code works very well. It's the conversion to hex that takes all the time.
Edit by tye