Embodiments relate generally to methods and apparatus to implement compression and decompression of policies including, for example, hardware decompression of policy vectors associated with policies and represented by bit vectors.
Policies including conditions and instructions (or actions) are used in, for example, packet classification and packet routing. Known policies are often represented as text files or described in a markup language within a text file. Representations of such policies can be stored in a memory of a packet classification appliance or device, but policies often occupy a significant portion of the memory of such a packet classification device.
Compression schemes for reducing the amount of memory occupied by a policy are known, but suffer several disadvantages. For example, compression of known representations of policies is difficult to implement in hardware-based packet classification devices due to memory, size, and logic constraints in hardware-based packet classification devices. Because such compression is difficult to implement in hardware-based classification device, benefits of hardware-based devices have not been realized in many packet classification devices. Thus, a need exists for improved methods and apparatus for improved policy classification in packet classification devices.