this is another involved explanation I would suggests a Google search of the following....'oblique and normal shock waves' and Prandtl-Meyer Expansion wave phenomena...
because the shock wave dissipates energy upon adiabatic expansion as long as the airframe is substantially within the mach cone.
Also, it depends on whether it's a double wedge- blunt object-like a bullet or a sharp object like an arrow...however the delta wing is the best planform for mitigation of compressibility effects as around 45 degrees the maximum reduction of normal sensed true airspeed vector occurs according to the Cosine of the sweep angle. of course, the basic airfoil shape is always important, thereby alleviating drag rise with TAS increase as well as compressibility effects...one other the most difficult aspects of high speed design is the heat dissipation problems associated with ram rise
the two basic designs would either be a Double wedged or circular arc...as I had said it's a very involved topic...
there are folks here more qualified in high speed aerodynamics than me so apologize for any horse hooey if any