The rapid laser driven shock compression of solids is modeled using a hydrodynamic computer code. By postprocessing output from these simulations and using a new, efficient x-ray diffraction algorithm we calculate time-dependent x-ray diffraction images which can be directly compared with experimental x-ray diffraction data. The measurement of shock compression of crystalline solids by x-ray diffraction is illustrated with three examples, one a square wave, and two triangular waves. The development of these waves and the associated x-ray diffraction patterns are followed as the waves propagate through the crystalline solid and interact with a free surface. Simulated x-ray streak camera data created with this hydrodynamic-x-ray diffraction model are presented and are compared to experimental data.