1. A method for compressing a packet classifier for a computer network system, comprising: partitioning a set of rules into one or more partitions, where each rule is expressed as a ternary string of bits that sets forth values for fields in a network packet and a decision for network packets having matching field values; for each partition, arranging columns of bits in each of the ternary strings of a given partition from a starting order to another order different than the starting order; for each partition, consolidating the ternary strings in a given partition into one or more replacement strings; for each partition, rearranging columns of bits in the replacement strings of back to the starting order; appending the rearranged replacement strings from each of the partitions together to form a compressed packet classifier; and instantiating the compressed packet classifier in a content-addressable memory device.