Specifically with LPs vs CDs, **usually** the CD is more compressed! The reason has nothing to do with the capabilities of either format. Its has to do with cars. Because CDs are expected to be played in cars, they are compressed.
When CD's first came out, there were several measurements showing greater compression, and less channel separation between CD's and vinyl. There's even an interesting blog post somewhere showing how Thriller got more and more compressed with each re-release. Not a result of the medium.
However, it doesn't have to be that way, and some of this has cooled off, but this varies by industry.
Listen to Trombone Shorty on CD for an example. :)
Best,
E