Grab a Windows installation ISO, if you don't already have one. There are various legal ways to do that. After that you can choose to make a Windows install USB, or Windows To Go. Alternatively you can just use any bootable USBs based on Windows PE
If you have chosen to write an install USB, just boot from it and
- Select Repair your computer > Troubleshoot > Command Prompt
- or simply press Shift+F10 when the blue menu screen appears
Now you're in the console and can do anything you want. For example to compress all files in drive C, use this
C: %= Change to drive C =%
compact /C /I /A /S *
If you have Windows To Go or Windows PE then it might be far easier because you'll do things in GUI like in normal Windows. But it'll start (and possibly run) much slower than a command line app. You also need to mount the system drive first because it's offline by default.
Windows To Go is only officially supported on Enterprise Edition, so if you have Home or Pro version you can find the way to create Windows To Go USB here: How to Create a Windows To Go USB Drive Without the Enterprise Edition
Remember: boot files must not be compressed, or Windows will fail to start
However this is not quite a good idea. Only selected folders that contains files that are mainly read and easily compressible should be compressed
Anyway Windows 8.1 already supports WIMBoot for reducing system footprint
Windows 10 threw that away and used a much better solution named CompactOS