How to use compact.exe to free up disk space on Windows – Ghacks
https://ift.tt/Gp2BXMI
Microsoft introduced new options for the command line tool compact.exe in the Windows 10 operating system. It allows users to compress folders on the system using new algorithms to free up disk space.
Unlike many other compression solutions, compact promises to have little impact on performance when the files need to be loaded by the system. Files are compressed without changing the file extension or location. Decompression happens during runtime, and most modern systems should not break a sweat doing so. The tool is included in Windows 11 as well.
Compact.exe compresses files and folders on Windows without changing filenames or making other modifications to the files. Depending on the type of files, compression may save Gigabytes of disk space or very little. Files that are compressed already, e.g., JPG image files, will show little gains when compress is run on them. Uncompressed files on the other hand may show large gains. You can check out this GitHub page, which lists hundreds of games and programs, and the savings when using compress.exe on them.
A few applications and games may react badly to compression. If that is the case, uncompressing will resolve the issue.
Tip: if you prefer a graphical user interface, check out CompactGUI. Windows includes an option to compress the entire drive. Right-click on any drive in explorer and select Properties to open the option. You find “Compress this drive to save disk space” under General in the properties window.
You may run the program from any command prompt window. Open a new command prompt window, e.g., by using Windows-R to open the run box, typing cmd.exe and hitting the Enter-key on the keyboard.
Running compact on its own displays the compression status of all folders and files of the current directory.
The command line tool support several parameters, some of which may be confusing at first.
The core commands compact.exe /c and compact.exe /u mark the current or specified directories so that future changes to the folder, e.g., modified files or newly added files, are compressed or uncompressed.
It is necessary to supply the /s parameter to the command to perform the selected operation on all files in the specified directory and all of its subdirectories.
By default, the current directory is used, but a directory may be supplied to perform the operation on a different directory instead. To do that, add path information to the command.
The command compact.exe /c /s:c:userstestdownloads runs the compression on the downloads directory.
You may specify the compression algorithm by supplying the /EXE parameter. The parameter /EXE:XPRESS8K uses that algorithm. The following algorithms are supported:
The default algorithm is designed to make the performance impact as minimal as possible, even on older systems. Most devices should not have issues using the 8k or even 16k algorithm instead.
Other useful parameters of compact.exe:
Large program and game folders, and folders with large uncompressed files, benefit the most from the compression. Gigabytes of disk space may be recovered with the help of the command. Most Windows users may use the CompactGUI program instead, as it is easier to use and handle.
Now You: have you used compact.exe in the past?
“game folders” + “compression”?? Good luck with that.
Cpu time will increase if you compress often used content, making nvme 3gb/s+ loads of data take forever. But unity games tend to compress to 50% or better, worth for games you play rarely. Defrag becomes a problem as windows’ in-place compression can drive fragmentation up to 100k times, a neat way to increase write amplification to kill ssds and spinning discs alike if left as is.
Clonespy with deduplication to hardlinks, is usually a less troublesome way to save space, as is dism renoval of unused windows features.
Please click on the following link to open the newsletter signup page: Ghacks Newsletter Sign up
Ghacks is a technology news blog that was founded in 2005 by Martin Brinkmann. It has since then become one of the most popular tech news sites on the Internet with five authors and regular contributions from freelance writers.
Tech
via Inferse.com https://www.inferse.com
May 14, 2022 at 09:39AM