Normal compressors do effectively do gain adjustment - it's not really the same as a typical amp since their core function only reduces gain, then makeup is applied to the entirety to compensate - but yes the result is effectively gain adjustment.
As for doing it "without regard for the frequencies present", if you compress a mix with a base guitar & high vocals, the impact of the compression on the base will be different than on the higher notes. This is aside from (/in addition to?) attack & release applied on a per-track basis & more just about the natural effect of dynamics within frequency ranges.