A method of packet classification as defined in claim 20 wherein each of the first group of states and the second group of states is represented by a table having 2n table elements wherein n is a number of bits within the data stream in dependence upon which the table element is selected.