Nonlinear compression of optical solitons