Below you can see the front-view size comparison of the Nikon D4 and Pentax 645Z. The Pentax 645Z is 4 mm narrower and 40 mm shorter than the Nikon D4 but it is also 32 mm thicker.
The chart below depicts how two cameras compare with average dimensions of the cameras in their class.