There is a flaw in your line of thinking.
Thus, to my understanding, writes to Program Files should primarily
only occur when installing an application. This makes compressing it
not only a huge source of space gain, but also a potential candidate
for performance gain.
Virtual Store is not used if the program is running as Admin. In the case of Setup Programs, this is all setup programs.
It's very rare to run into a program that isn't UAC aware these days and where VirtualStore takes over. For example, my Virtual Store only lists Foxit Reader.
Compressing it though, does look interesting. In my case, compressed my Program Files out of curiosity. My most disk intensive programs is the Total War series: Napoleon, Empire, Shogun 2. In particular, switching between Battle map and the Campaign map involves a heavy amount of reads.
I decided to compress the Steam folder and fire it up a few times. Predictable, since the game loads require heavy sequential reads, it was slower. My map loading times went from 38 seconds to about 48, although it actually took over two minutes my first time loading.
I haven't tried other applications.
Best Answer
Short answer
No, it's not possible at this time.
Long answer
Files and folders1 are compressed and decompressed by passing a
FSCTL_SET_COMPRESSION
control code and a compression state to theDeviceIoControl
API function. The compression state can be one of the following:Any nonzero value means the target item is going to be compressed. From the official documentation:
The LZNT1 algorithm is designed for speed, and there's no way to set a custom compression level.
1 Folders aren't actually compressed: their compression attribute only gives a default compression state to new files and subfolders.
Additional information
Further reading