Many of you may know that NTFS file system used by Windows 10 already has a built-in NTFS compression feature. But in Windows 10 Microsoft has added couple of new compression algorithms. In this article we are going to tell you about LZX compression, the strongest of these algorithms. Compared with the already familiar to us NTFS compression, LZX algorithm has a much higher compression ratio (it’s about 40-60%).
Compression by using the LZX algorithm in Windows 10 is performing manually. To do it, we need to use Compact OS feature. Manipulations with compressed files are fully transparent for the user.
Main disadvantages of LZX:
- LZX compression is performing manually, so after file overwriting / updating / changing, you need to perform compression again. This type of compression is not appropriate for continuously variable files and temporary folders
- Unzipping consumes additional CPU and memory resources
- Compressed files are not highlighted in Explorer (files compressed with NTFS compression are highlighted in blue)
Note. Files compressed with LZX algorithm cannot be opened in the previous Windows versions.
It is ideal to use LZX compression for static files with only read/run access. There are games, distribution software or number of system directories.
For example, you can compress the folder with Far Cry 4 game. It will reduce its size from 27 to 17 GB. The same situation with Counter-Strike: Global Offensive: 10 vs. 7.5 GB.
Note. There is no reason to compress multimedia files (photos, video, music), because they are already compressed.
You have to perform compression by using Command Prompt as Administrator. For example, if you want to compress a single file, use the command:
compact /c /a /exe:lzx "C:\Program Files (x86)\mirkes.de\Tiny Hexer\mpth.exe"
In our case, the size before compression was 1.54 MB and 0.7 MB after it.
If you want to compress all the files in a specific directory, use the command:
compact /c /s /a /i /exe:lzx "C:\Program Files (x86)\*"
The size of this directory has been decreased almost twice.
If you want to unpack the compressed files or directories, use the commands:
compact /u /a /exe “C:\Program Files (x86)\mirkes.de\Tiny Hexer\mpth.exe" compact /u /a /s /exe "C:\Program Files (x86)\*"
Despite the steady increase in media capacity, the problem with a free space is still relevant. Most often the problem arises if you are using SSD drives, where the GB cost is quite high. By using LZX compression in Windows 10 you can save your disk space, but there is a small loss of performance over here. So, try it out.
- How to Install and Configure SNMP Service on Windows 10? - December 25, 2020
- How to Migrate User Profiles with User State Migration Tool (USMT) on Windows 10? - December 24, 2020
- PowerShell: Convert String to Int - December 18, 2020