Please see Re^6: [OT] The interesting problem of comparing bit-strings. for the problems of finding bitstring needles that cross byte boundaries using byte-wise operations.
In brief, you need to perform two (different) byte compares using two different byte masks at each of 7 different offsets (with different masks and comparison values for each) for every byte in the haystack in order to locate a single byte needle.
In reply to Re^6: [OT] The interesting problem of comparing bit-strings. (More info.)
by BrowserUk
in thread [OT] The interesting problem of comparing bit-strings.
by BrowserUk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |