3 ms·
The approximate grep (agrep) bitwise string search algorithm in Go
- bugfix-66 4y agoThis is the Bitap (or Shift-And) algorithm described here: https://en.m.wikipedia.org/wiki/Bitap_algorithm https://en.m.wikipedia.org/wiki/Bitap_algorithm Change maybe := prefixes << 1 to maybe := prefixes<<1 + 1 to fix the bug.