Method and system for compressing a data packet is provided. The method
includes receiving a data packet; comparing the data packet with content
stored in a history module; wherein plural comparisons are performed in
parallel; generating a plurality of masks based on the comparisons;
comparing the plurality of masks; selecting one of the plurality of
masks, based on the mask comparison; and generating a compression record,
wherein the compression record includes; size of a data packet, an
address field, a mask field and data; and a data packet header includes a
control bit indicating if the data packet is compressed.