1. A method for generating ternary content addressable memory entries to represent a search range, comprising the steps of: generating range code values to represent the search range, the range code values comprising at least a prefix that includes a plurality of bit values; compressing range code values based on the values varying from one another by predetermined least significant bit values into one range code value; and adding an extra bit to the compressed range code value to indicate the compressed range code value.