Could you just use sysopen/sysread to read blocks of data in and then remember the offsets of the 4-byte sequences? You could then go back and seek directly to the remembered offset and sysread the data in, repeating as needed.
You do have to worry about the case where the 4-bytes overlapped the end of a block. You could handle this by always reading ahead 1 block and then copying 3 bytes from the beginning of the next block to the end of the one you are working on before you check for the 4-byte sequence. (I've written too much C to be able to come up with anything more elegant.)
bluto
In reply to Re: How do I search this binary file?
by bluto
in thread How do I search this binary file?
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |