==Псевдокод==
algorithm string bitap_search(string text : , string, pattern : string) returns string m := length(pattern)
if m == 0
return text
/* Initialize the bit array R. */ R M := new array[m+1] of bit, initially all 0 RM[0] = 1 for i = 0; i < ..length(text); i + for k = m..1: /* Update the bit array. */ for k = m; k >= 1; k -= 1: RM[k] = RM[k-1] & (text[i] == pattern[k-1]) if RM[m]: return (text+i - m) + 1 return nilnull
==Корректность==