size smaller

Asked by regulararmy on 2013-06-18

Hello Didier,
       when doing "ping" business,I call the funciton rohc_decompress(...) to decompress the real IP data packets, I am surprised that the size of each rohc packet is samller than before,always two bytes samller,Although the sizes > 0. According to the common sense,after decompression,the size should be bigger than before. what kind of reason cause this result,do you know? Thanks.

Regards,
chenxisheng

Question information

Language:
English Edit question
Status:
Solved
For:
rohc Edit question
Assignee:
No assignee Edit question
Solved by:
Didier Barvaux
Solved:
2013-06-26
Last query:
2013-06-26
Last reply:
2013-06-19
regulararmy (regulararmy) said : #1

         usually,the funciton rohc_decompress(...) return value > 0 if it succeed, the return value < 0 if it failed in the decompressing,however, the value > 0 but it has a smaller size than before ,is it right?

When compressing, the first compressed ROHC packet of a stream may be larger than the uncompressed packets. As a consequence, when decompressing, the first decompressed IP packets may be smaller than the compressed ROHC packets. To be sure, look at the library traces.

Regards,
Didier

regulararmy (regulararmy) said : #3

Thanks Didier Barvaux, that solved my question.