The invention relates to a method for calculating checksums based on a data packet IP hearder compression technology, wherein in the decompression process, checksums are respectively calculated according to the property of each field of UDP (
User Datagram Protocol) and TCP (
Transmission Control Protocol) checksums; the checksums are calculated for only one time for invariable fields in the whole
stream life cycle; for the basically invariable fields, firstly, the fields are compared with the original IP packet, and if that the fields are not changed is discovered, the checksums do not need to be calculated. By adopting the method for calculating checksums based on the data packet IP hearder compression technology, the consumption of a
processor time slice is reduced, the decompression efficiency is improved, the length of the fields which need to be calculated by the compression
checksum calculating method is obviously reduced, and for IPv4 / UDP / RTP packets the net load length of which is 20 bytes, the compression
checksum calculating method can save calculating amount by 1.7 times, thereby effectively improving the efficiency of IP header compression, reducing the calculating amount of the checksums and saving the
system resource expenses; and moreover, the method has fast and convenient
processing process, stable and reliable working performance and wider range of application.