fix the calc of compressed data length