In a method for detecting patterns, a plurality of data patterns is stored in a memory, and a data block from a stream of data is received. A first subset of the data block is compared in parallel to the plurality of data patterns. A second subset of the data block is compared in parallel to the plurality of data patterns, wherein the second subset partially overlaps the first subset. At least one signal is generated that indicates a detected data pattern in the data block.