The compression behavior in a multi-anvil apparatus of a foil of Ni3Al embedded in a pressure medium of NaCl has been studied by energy-dispersive X-ray diffraction (EDX). At ambient temperature, the pressure and stresses, determined from line positions of NaCl, were constant throughout the sample chamber. Line positions and line widths of NaCl reflections were reversible on pressure release. Ni3Al polycrystals, in contrast, undergo extensive (ductile) plastic deformation above 4 GPa due to the onset of high non-hydrostatic stresses and the introduction of stacking faults and dislocations. Plastic deformation due to stacking faults leads to a volume incompressibility followed by elastic compression of a fully plastically deformed state. The compression of a fully plastically deformed material is elastic and isotropic, independent of the presence and type of pressure medium. A discontinuity in the compressibility at the transition back from plastic to elastic compression is due to the yield strength of the plastically deformed material and corresponds to the Hugoniot elastic limit.