When you compress a drive, some files are exempted, but you can force it, and then it's your problem
On the drive property sheet for an NTFS volume, there is a checkbox called “Compress drive to save disk space.” If you check that box, the shell marks the drive as “compress all newly-created files” and also goes through and compresses all the existing files on the drive.
Well, almost all the file.
Some files are exempted by default.
Examples of exempted files are the files involved in booting the system (
HIBERFIL.SYS) and files for which write requests must succeed (
PAGEFILE.SYS). (If a file is compressed, then a write to previously-committed file data may fail if the new data does not compress as well as the old data and there is no more disk space.) These files are exempted on all drives, even if they’re not your system drive.
On the other hand, if you right-click one of these exempted files and explicitly compress it, then the shell will compress it (or at least try to). For boot files, this will typically succeed since boot files are used only at boot; once the system is running, they aren’t needed any more and therefore there aren’t any open handles to the file with restrictive sharing modes.
Of course, if you do this to your system drive, it won’t boot any more. So don’t do that.
Like with many things in the physical world, if you force it too hard, it may break.