find the maximum compression