Compactor is a small Windows GUI for applying Windows Overlay Filter (WOF) filesystem compression to folders.
This repository is a maintained fork of Freaky/Compactor. It retains the original Rust GUI and WOF-based compression model while fixing known issues and improving analysis and maintenance.
- XPRESS4K, XPRESS8K, XPRESS16K, and LZX compression
- LZX as the default compression mode
- Sampled compressibility analysis before compression
- Configurable minimum estimated savings threshold, defaulting to 1%
- Estimated post-compression size and additional savings during analysis
- Storage-aware multithreaded analysis and compression on SSDs
- Conservative physical-core-aware LZX Auto concurrency with manual override
- Single-threaded HDD operation by default
- HDD analysis sampling designed to reduce seek overhead
- Configurable compression/decompression worker priority, defaulting to Below Normal
- The system is kept awake during compression/decompression while the display may still turn off
- Local-NTFS target validation and protection for Windows-managed paths
- DirectStorage runtime detection with a warning before compression
- In-app searchable viewer for folders containing WOF-compressed files
- Pause, resume, and stop controls
- Timestamp preservation after compression and decompression
- Automatic retry of previously incompressible files after they change
- Case-insensitive exclusion patterns with blank-entry filtering
- Safe handling of encrypted, sparse, offline, reparse-point, and NTFS-compressed files
- No default file-extension exclusions
- Compression:
LZX - Minimum estimated savings:
1% - Maximum threads:
Auto - Compression priority:
Below Normal - HDDs only use 1 thread: enabled
- Excluded paths:
*:\\Windows**:\\System Volume Information**:\\$*
Auto is storage- and workload-aware. On SSDs it uses up to eight workers for analysis. XPRESS compression can use up to 16 logical-CPU workers. LZX Auto uses one outer worker on CPUs with four or fewer physical cores and at most two on larger CPUs because LZX WOF operations can be CPU-intensive. A manual limit from 1 to 16 is treated as an explicit override and is respected for LZX as well. HDDs still use one worker by default when the HDD safeguard is enabled, and unknown storage is handled conservatively with one worker. Compression reuses a valid analysis estimate when the file has not changed, avoiding duplicate sampling before WOF compression.
Compression/decompression worker priority can be set to Lowest, Below Normal, Normal, Above Normal, or Highest. Only the worker threads are affected; the GUI and analysis threads remain at normal priority. Below Normal is the default so idle CPU capacity can still be used while foreground work gets preference when the system is busy.
File extensions are not used to decide whether a file should be compressed. Eligible files are sampled and compared against the configured savings threshold.
Download the latest Windows x64 executable from the Releases page.
Compactor is portable and does not require an installer or background service.
- Choose a folder.
- Wait for analysis to complete.
- Review current disk usage and estimated savings.
- Change the compression mode, savings threshold, thread limit, or worker priority in Settings if required.
- Select Compress.
Use Decompress to remove WOF backing from files previously compressed with Compactor. After analysis, select View beside the compressed count to browse folders containing WOF-compressed files inside Compactor. The viewer includes path filtering and pagination for large scans.
Compactor is best suited to applications and game files that change infrequently. Modifying a WOF-compressed file causes Windows to materialise it again, so updated folders may need to be analysed and compressed again.
Compression and decompression hold each active file against concurrent writers and deleters while still allowing readers. This reduces the risk of racing an application or game update in the middle of a WOF operation. Files that change between analysis and compression are re-estimated instead of reusing stale analysis results.
If a selected folder contains dstorage.dll or dstoragecore.dll, Compactor warns that DirectStorage is present. WOF compression can prevent DirectStorage/BypassIO from taking its intended fast path, so consider leaving DirectStorage games uncompressed when I/O performance matters.
Do not run Compactor blindly across an entire system drive. Whole-drive roots, network/UNC targets, non-NTFS filesystems, the active Windows directory, System Volume Information, root $* directories, and the root Recovery directory are rejected. User-selected folders can still contain databases, virtual machines, active logs, or other write-heavy files that are poor candidates for WOF compression.
Compactor does not elevate itself through UAC. Protected files may require running the program with appropriate permissions.
Keep backups of important data. The software is provided without warranty under the MIT License.
This fork includes the following changes:
- Correct Win32
BOOLhandling for WOFDeviceIoControlcalls - Correct handling of
ERROR_COMPRESSION_NOT_BENEFICIAL - Required read-data/write-attributes access for WOF operations
- File handles that block concurrent writers/deleters during active WOF operations
- Case-insensitive exclusions and blank-entry filtering
- Explicit skipping of encrypted, sparse, offline, reparse-point, and NTFS-compressed files
- Incompressible-cache keys based on path, file size, and modification time
- Zero-safe progress calculations and saturating size arithmetic
- Byte-aware compression progress
- Configurable savings thresholds
- Estimated post-compression size and savings in the GUI
- Actual NTFS cluster-size-aware eligibility and projected allocation
- LZX as the default compression mode with a conservative one-or-two-worker Auto policy and manual override
- Configurable compression/decompression worker priority, defaulting to Below Normal
- System-sleep prevention during compression/decompression without forcing the display awake
- Stronger local-NTFS and Windows-managed-path target validation
- DirectStorage runtime warning
- Removal of default file-extension exclusions
- Storage-aware worker selection and parallel SSD processing
- Reduced-seek HDD analysis sampling
- Lower scan memory usage for large excluded trees and bounded parallel estimation batches
- More accurate post-decompression on-disk accounting
- In-app compressed-folder viewer with filtering and pagination
- Windows x64 CI on stable Rust
See CHANGELOG.md for the full change history.
Requirements:
- Windows 10 or Windows 11
- Stable Rust with the
x86_64-pc-windows-msvctoolchain - Microsoft C++ build tools required by the Rust MSVC toolchain
Build with:
cargo build --releaseThe executable is written to:
target\\release\\Compactor.exe
Compactor is primarily written in Rust and uses a local embedded web-view for the GUI. It does not require remote web resources at runtime.
WOF compression is applied through FSCTL_SET_EXTERNAL_BACKING and removed through FSCTL_DELETE_EXTERNAL_BACKING.
Compressibility sampling uses Thomas Hurst's compresstimator project. SSD analysis uses distributed sampling, while HDD analysis uses a small number of contiguous sample windows to reduce seek overhead. Estimates are sampling results and are not exact predictions of final WOF size; the displayed projection is also adjusted for the selected WOF algorithm and rounded to the target volume's NTFS cluster size.
Windows storage-property queries are used to distinguish storage with and without seek penalties. If storage type cannot be determined, Compactor uses one worker thread. Windows processor-topology information is used to choose the conservative LZX Auto worker count; explicit manual thread limits override that Auto policy.
Compactor was originally written by Thomas Hurst (Freaky). This fork retains the original MIT-licensed work and attribution.
See LICENSE.txt for license terms.
