A fresh Windows installation might start at 20 GB, but give it a few months—updates, restore points, and caches can easily push that to 60 GB or more. On laptops with soldered 128 GB SSDs, that’s the difference between a functional machine and one that can’t install the next feature update.
Compactor, a free Rust-based GUI tool, taps into Windows 10’s file compression APIs to shrink game, SDK, and application folders by as much as 50%. The tool has been quietly saving gigabytes for thousands of users, but its interaction with modern gaming technologies like DirectStorage and certain file types demands a careful approach. Combining Compactor with built-in Windows cleanup utilities can recover dozens of gigabytes without compromising system stability—if you know which landmines to avoid.
Compactor Brings Professional Compression to the Masses
Windows 10 shipped with a redesigned compression stack that uses lightweight algorithms (XPRESS and LZX) capable of handling gigabytes per second per core. Yet Microsoft only exposed it through a command-line tool, compact.exe. Compactor fills that gap with a straightforward graphical front-end that requires no terminal knowledge.
The tool packs several advantages over its command-line ancestor. It provides real-time progress updates, so you can watch disk usage tick downward as files are compressed. All operations can be paused or restarted safely, and a built-in “compresstimation” engine quickly skips large files that would show little benefit, avoiding wasted minutes of disk grinding. A machine-learning-style hash database remembers incompressible files, speeding up repeated scans on the same folder.
Written in Rust, Compactor handles millions of files without choking. Its default settings already delivered eye-opening savings in tests shared on the project’s GitHub page:
| Application / Folder | Original Size | Compacted Size | Ratio |
|---|---|---|---|
| AI War 2 | 2.43 GiB | 1.42 GiB | 0.59x |
| Deus Ex MD | 41.31 GiB | 28.06 GiB | 0.68x |
| Microsoft SDKs | 5.91 GiB | 2.45 GiB | 0.41x |
| Visual Studio 2017 | 9.63 GiB | 4.77 GiB | 0.50x |
| Windows Kits | 5.38 GiB | 2.03 GiB | 0.38x |
A full community-driven database of results is maintained by the CompactGUI project, showing similar gains across hundreds of titles.
Under the hood, Compactor uses DeviceIoControl with FSCTL_SET_EXTERNAL_BACKING and FSCTL_DELETE_EXTERNAL_BACKING, plus Windows Overlay Filesystem (WOF) functions. This is the same mechanism Microsoft employs for its own CompactOS feature, which exclusively targets system binaries.
Where Compactor Can Bite You
Compressing files that rarely change—like game assets, static binaries, or development kits—is generally safe and transparent. But the moment an application opens a file for writing, Windows must decompress it entirely before any modification can happen. That makes databases, virtual machine images, logs, and other mutable file types poor candidates. Opening such a file in write mode can stall until decompression completes, even if no changes are made.
The developer documented one report of data corruption with an open SQLite database file. Version 0.10 added file locking to prevent concurrent modifications, but the warning stands: never point Compactor at active database files. Similar logic applies to Oracle, MySQL, or PostgreSQL data stores, as well as .pst files and any directory that hosts frequent, small writes.
DirectStorage and BypassIO: The New Wrinkle
Microsoft’s DirectStorage technology relies on BypassIO, a capability that lets games stream data directly from NVMe drives to the GPU with minimal CPU involvement. The Windows documentation explicitly states that NTFS compression—including the WOF-based compression used by Compactor—cannot be enabled on a file that has BypassIO active. The BypassIO stack may refuse to work if a compression filter is present, robbing gamers of fast load times in titles like Forspoken or future releases that lean on the API.
This isn’t a Compactor bug; it’s a low‑level incompatibility. If you compress a DirectStorage-enabled game folder, you might not corrupt data, but you could disable the very technology that delivers sub‑second loading. The safest course is to exclude any title that ships with DirectStorage support, test performance before and after compression, and keep a backup of the original files.
The Exclusions You Absolutely Need
Before running Compactor, build an exclusion list. Avoid compressing:
- Virtual machine disk images (VHD, VHDX, VMDK)
- Database files (SQLite, MySQL, SQL Server, Oracle)
- Log directories and frequently written configuration files
- The Windows folder (use CompactOS instead)
- Any game known to rely on DirectStorage
- Pagefile.sys and swap files (these are locked anyway)
The tool already skips system folders by default, but it’s wise to review its suggestions before confirming.
Safe Windows Cleanup: The First Steps
Before reaching for heavy artillery, exhaust Microsoft’s own maintenance tools. They’re reversible, supported, and often recover several gigabytes immediately.
Disk Cleanup and Storage Sense remain the most underutilised features in Windows. Run Disk Cleanup as administrator, click “Clean up system files,” and you’ll often find multi-gigabyte Windows Update leftovers and temporary installation files. Turn on Storage Sense (Settings → Storage → Storage Sense) and configure it to remove temporary files and Recycle Bin contents automatically.
Startup applications are another silent culprit. Each background process consumes RAM, CPU time, and occasionally writes to caches. Open Task Manager → Startup, disable non-essential entries, and uninstall unused programs from Settings → Apps → Installed apps. This step alone can free a few hundred megabytes of storage and make the system feel snappier.
Taming the Search Index and Reserved Storage
The Windows Search index file—Windows.edb on Windows 10 or Windows.db (SQLite) on Windows 11—can grow into many gigabytes if you index large PST archives or entire drives. It lives under %ProgramData%\Microsoft\Search\Data\Applications\Windows. To shrink it, rebuild the index via Indexing Options → Advanced → Rebuild. On older Windows 10, you could offline-defragment with esentutl.exe /d, but that doesn’t apply to Windows 11’s SQLite format; just rebuild. Searches will be sluggish during reindexing, so schedule this during idle hours.
Reserved Storage is a less obvious space hog. Windows reserves roughly 7 GB for updates, language packs, and temporary files. You can query its state with Get-WindowsReservedStorageState in PowerShell and disable it via Set-WindowsReservedStorageState -State Disabled. Microsoft documents this as a supported tweak, but the trade-off is real: disabling it means future feature updates will demand ample free space on your drive, possibly forcing you to offload files or attach external storage.
CompactOS: Microsoft’s Own System Compression
For the Windows directory itself, use the built-in compact /compactOS:always command from an admin Command Prompt. CompactOS applies the same WOF compression algorithms to system binaries, typically reclaiming 2–6 GB. Microsoft recommends it for storage-constrained devices, though it admits the performance footprint varies: fast CPUs with slow storage benefit; older CPUs may see a slight launch-time penalty.
You can check the current state with compact /compactOS:query and reverse it with compact /compactOS:never. Unlike Compactor, CompactOS is thoroughly tested by Microsoft and remains fully supported through updates.
Per-Folder Compression with CompactGUI and Compactor
CompactGUI, a C# program that shells out to compact.exe, offers a familiar interface but struggles with very large folders due to its one-file-at-a-time design. Compactor’s Rust-based architecture and direct API calls make it the faster choice for multi-gigabyte game directories. Both tools let you right-click a folder, estimate savings, and apply compression with a few clicks.
The rule of thumb: compress static folders you read often but rarely write to. Games, SDKs, and Program Files directories are prime candidates. The compression ratios shown earlier are typical—40–60% reductions are common—but they aren’t universal. Some titles, especially those using heavily compressed assets (many JPEGs or audio files), will show little benefit on top of their existing compression.
Going Nuclear: Debloating and Custom Images
For the most extreme space savings, some users turn to debloating scripts and stripped-down Windows ISOs. Tools like NTLite let you legally create a custom Windows image by removing components, languages, and drivers from an official Microsoft ISO. The result is a minimal installation that can reclaim several gigabytes permanently—but you’re responsible for testing updates and losing official support if you remove core packages.
Community scripts like WinUtil (Chris Titus Tech) and Win11Debloat automate the removal of preinstalled apps, telemetry, and interface elements. They often include revert instructions, but removing certain OS components can break cumulative updates. The Tiny11 project goes further, producing ISOs as small as a few gigabytes by stripping Defender, Windows Update, and recovery tools. These builds are not serviceable and should only be used in isolated environments.
Even Microsoft’s own DISM commands require caution. dism /online /Cleanup-Image /StartComponentCleanup /ResetBase removes superseded system components from the WinSxS store, freeing multiple gigabytes, but it permanently prevents you from uninstalling earlier updates. Run /AnalyzeComponentStore first, and only use /ResetBase after confirming backups and stability.
A Layered Strategy for Real-World Gains
Disk space recovery on Windows isn’t about one magic trick; it’s a series of decisions with increasing risk. Start with Disk Cleanup, Storage Sense, and uninstalling bloat. Move to CompactOS and the search index rebuild. Only then consider Compactor or CompactGUI for game and SDK folders, with a strict exclusion list. Reserve NTLite, WinUtil, and Tiny11 for disposable virtual machines or test benches, not a daily driver that needs security updates.
Compactor’s developer warns that modifying live database files can lead to corruption, and Microsoft’s own documentation confirms that BypassIO and NTFS compression don’t mix. With those guardrails in place, the tool becomes one of the most effective ways to claw back storage without deleting a single application. On a 128 GB laptop, that can mean the difference between constant “low disk space” warnings and a system that hums along with room to spare.