Compression occurs after deduplication and just before the data is actually written to the persisent data layer.
In vSAN 7.0 U1 and onwards there are three settings to choose from: "None", "Compression Only" or "Deduplication".
When choosing "Compression only" deduplication is effectively disabled. This optimizes storage performance, resource usage as well as availability. When using "Compression only" a single disk failing no longer impacts the entire disk group.