  We present a detailed analysis of a quantum memory for photons based on
controlled and reversible inhomogeneous broadening (CRIB). The explicit
solution of the equations of motion is obtained in the weak excitation regime,
making it possible to gain insight into the dependence of the memory efficiency
on the optical depth, and on the width and shape of the atomic spectral
distributions. We also study a simplified memory protocol which does not
require any optical control fields.
