Patent ID: 8755381

Claim:
A system for processing packets, the system comprising: a communications interface configured to receive a plurality of packets at a network device between a source and a destination, each of the packets including data and flow information; and a processor configured to identify a flow between the source and the destination based on the flow information in each of the plurality of packets to determine whether at least a portion of the data from the received plurality of packets indicates a potential match to data in storage using hashes, to remove a header from each of the plurality of packets if no indication is found of a potential match to data in storage, to store the data from each of the plurality of packets with the removed header in a block of memory allocated for the flow, wherein the allocated block of memory comprises a page of contiguous memory and the storage includes both fast memory and slow memory used to process the flow, to retrieve a list of possible data matches, to use a computed hash index to index a hash table for the data, to determine match sizes of the most likely data match and second most likely data match, to store the data from the most likely data match and second most likely data match in the block of memory allocated for the flow if both match sizes are small, and to generate a retrieve instruction with the computed hash index of the data for the match with the larger match size if at least one match size is not small.