Entropy of Irreversible Isothermal Compression
There is no reversible process that can take both the system and the surroundings to the same final states (simultaneously) that they reached in the irreversible process.  So, to get their changes in entropy for the irreversible process, we need to first separate the system from the surroundings and then subject each of them separately to new reversible processes (perhaps even involving a second and third "surroundings").

For the case of the original surroundings, we know that $Q_{irrev, surr}=-Q_{irrev, syst}$.  So, from the first law applied to the irreversible process $$\Delta U_{irrev, surr}=-Q_{irrev, syst}$$The alternate reversible process for the surroundings must take it between the same two states.  This means that the internal energy for the alternate reversible process must suffer the same change as for the irreversible process.  The only way this can happen is if the heat flow for the alternate reversible process is the same as for the irreversible process.  So, the entropy change for the surroundings in the irreversible process is given by $$\Delta S=-\frac{Q_{irrev, syst}}{T}$$

Here is an example of how this plays out for a specific irreversible isothermal compression or expansion.  The example works equally well for both expansion and compression.

The initial state of the system is specified by $P_1V_1=nRT$.  The irreversible process is specified by suddenly changing the external pressure on the piston from $P_1$ to $P_2$, and then allowing the gas to re-equilibrate irreversibly to its new equilibrium state with volume $V_2$ given by $V_2=P_1V_1/P_2$.  Since, during this irreversible process, the external pressure is constant, the work done by the gas on the surroundings is given by $$W=P_2(V_2-V_1)=nRT\left(1-\frac{V_1}{V_2}\right)$$This is also equal to the heat Q transferred from the surroundings to the system:  $$Q=nRT\left(1-\frac{V_1}{V_2}\right)$$So the entropy change of the system during this irreversible process is given by:  $$\Delta S_{syst}=nR\ln{(V_2/V_1)}$$And from the analysis I presented above, the change in entropy of the surroundings during this irreversible process is given by
$$\Delta S_{surr}=-nR\left(1-\frac{V_1}{V_2}\right)$$The overall change in entropy for the system plus surroundings for this irreversible process is thus given by
$$\Delta S=nR\left[\ln{(V_2/V_1)}-\left(1-\frac{V_1}{V_2}\right)\right]$$The term in brackets in this equation is positive for all values of the ratio of the volumes, whether the ratio greater than unity or less than unity.  Therefore, the Clausius inequality ($\Delta S&gt;0$) is satisfied for both expansion and compression in this irreversible process.