1. A method, comprising: receiving input data that is divided into multiple segments, to be searched for occurrences of a set of patterns; assigning the input data and the patterns to first and second pattern matching algorithms, wherein the first pattern matching algorithm is configured to search only within each of the segments, and the second pattern matching algorithm is configured to search across boundaries between adjacent segments; and searching the input data using the first and second pattern matching algorithms;