Compression of extreme-ultraviolet ultrashort pulses by grating configurations