Hi everyone, in this article we will show you how to compress files/folders using compact.exe on Windows. Speaking of compressing a file, most of us are no strangers to this topic. Common compressed file formats are .zip, .rar, .7z, .tar, etc. The origins of file compression date back to about half a century ago. In the 1970s, computer scientists were looking for ways to reduce file size, and they succeeded they sifted through computer code using mathematical algorithms.
Over time, files not only become more numerous, but also larger. While it used to be an incredible feat to send 30 pages of text in a few minutes, today’s computer user expects HD video and sound on demand. Most computers are equipped with enough memory that storing large files isn’t much of a problem, and expanding storage with an external hard drive or USB flash drive or external SSD, is easy and inexpensive. Nevertheless, when working with oversized files, it is advisable to save disk space.
Moreover, many popular programs limit the size of data in various ways. Data compression involves modifying or encoding structured data so that it requires less storage space when stored on a computerized system. In other words, any operation in which data or data fragments undergo a reduction in their original storage size or bit rate is data compression.
How to Compress Files/Folders using compact.exe on Windows
How to Compress Files With compact.exe
To use compact.exe, you may need a command line tool either Command Prompt or Windows PowerShell. We will use the latter. To use compact.exe to compress records, perform the following steps.
Step 1 : Open Windows 11 Windows PowerShell as admin
Step 2 : To compress a single file, you may have to enter a command with the construction under:
compact [file path]
Step 3 : Just substitute file path within the sq. brackets above with the precise path to the file. In PowerShell, it ought to appear to be the screenshot under.
Step 4 : By default, compact.exe will use the XPRESS4K algorithm to compress the file. To use a particular algorithm, use the under command construction:
compact /exe:[algorithm] [file path]
Step 5 : You will want to substitute algorithm within the above sq. bracket with the identify of the particular algorithm you need to use. So should you have been going to use the XPRESS8K algorithm, the command construction can be as follows:
compact /exe:XPRESS8K [file path]
Step 6 : Hit the Enter key and compact.exe will compress the file and present you the outcomes.
How to Compress Folders With compact.exe
Step 1 : Press Win + S to launch Windows Search and then enter powershell within the search field.
Step 2 : Click on Windows PowerShell to launch the app.
Step 3 : Within PowerShell, navigate to the listing or folder with the recordsdata you need to compress. The command to do this has the next construction:
cd [folder path]
Step 4 : You simply have to substitute folder path within the sq. brackets above with the precise path to the listing. Since the folder we would like to compress is on the desktop, the screenshot under exhibits what the command appears to be like like in PowerShell.
Step 5 : Once PowerShell is within the desired listing, enter the under command:
compact /c
Step 6 : By default, compact.exe will use the XPRESS4K algorithm to compress the folder. To select a distinct algorithm, use the next command construction:
compact /exe:[algorithm]
Step 7 : Replace algorithm within the sq. brackets above with the identify of the particular algorithm you need to use. So, if you need to use the XPRESS8K algorithm, this is what the command you’d enter in PowerShell would appear to be:
compact /exe:XPRESS8K
Step 8 : Press the Enter key, and the utility will compress the recordsdata within the folder and show the compression outcomes afterward.
Final Words
We hope you like the article how to Compress Files and Folders with compact.exe on Windows devices. Data compression has a wide range of computer applications. Moreover, data compression plays an essential role in streamlined organizational functionality and timely transfer of data. so, if you like our article, then share it others.
I hope you understand this article, Compress Files/Folders using compact.exe on Windows.