Energy compressor for a 300 MeV electron linac