Soft x-ray grating compressors for free-electron-laser pulses