We study quantum compression and decompression of light pulses that carry quantum information using a photon-echo quantum memory technique with controllable inhomogeneous broadening of an isolated atomic absorption line. We investigate media with differently broadened absorption profiles, transverse and longitudinal, finding that the recall efficiency can be as large as unity and that the quantum information encoded into the photonic qubits can remain unperturbed. Our results provide new insight into reversible light-atom interaction, and are interesting in view of future quantum communication networks, where pulse compression and decompression may play an important role to increase the qubit rate, or to map quantum information from photonic carriers with large optical bandwidth into atomic memories with smaller bandwidth.