The discontinuous volume change in transition-metal compounds due to the pressure-induced spin-state transition