Optical fibre-grating pulse compression