What does Gauss' divergence theorem say about compression of a body under self-gravitation?
Gauss's divergence theorem applied to the gravitational field $\vec{g}$ is that
$$ \oint \vec{g} \cdot d\vec{A} = \int \nabla \cdot \vec{g}\ dV,$$
where the left hand side is the flux of gravitational field into/out of a closed surface and the right hand side is the integral of the divergence of that field over the volume enclose by the surface.

The fundamental definition of how mass produces gravitational field is that
$$ \nabla \cdot \vec{g} = -4\pi G \rho,$$
where $\rho$ is the mass density.

If you are at a point outside the mass then the right hand side of the divergence theorem  becomes a constant.
$$ \oint \vec{g} \cdot d\vec{A} = -4\pi G \int \rho\ dV = -4\pi GM.$$
Therefore the left hand side is also constant when calculated over any surface that encloses all the mass.

If you allow the mass to contract in a spherically symmetric fashion, then as the gravitational field on the left hand side is then always in the radial direction then $\vec{g}$ must stay the same at any position in space outside the mass distribution.