Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added CompactGUI/assets/Home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CompactGUI/assets/Home_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CompactGUI/assets/Watcher.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CompactGUI/assets/Watcher_zh.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
88 changes: 48 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,88 +1,96 @@
<p align="center"><img src="https://github.com/IridiumIO/CompactGUI/assets/1491536/64f66b5d-0710-4f66-8b88-6a69f7eb9b63" width="500"></p>


&nbsp;

<p align="center"><b>CompactGUI transparently compresses your games and programs reducing the space they use without affecting their functionality. It works directly with the Win32 API to achieve the same thing as the native <code>compact.exe</code> command-line tool available from Windows 10 onwards.</b></p>
<p align="center"><b>CompactGUI transparently compresses your games and programs reducing the space they use without affecting their functionality. It works directly with the Win32 API to achieve the same thing as the native <code>compact.exe</code> command-line tool available from Windows 10 onwards.</b></p>

&nbsp;
&nbsp;

<p align="center"><img src="https://user-images.githubusercontent.com/1491536/172040389-62932137-11ae-49c8-8749-95c0b67f3aab.png" width="250"/><img src="https://user-images.githubusercontent.com/1491536/172040455-6cd06756-6323-44da-b350-daa47f31c5e3.png" width="250"/><img src="https://user-images.githubusercontent.com/1491536/172040456-09c069e3-093a-4c5e-8d69-f52d4dc2f982.png" width="250"/></>
<p align="center"><img src="CompactGUI/assets/Home.png" width="750"/></>

------
---
<p align="center">
<a href="README.md">English</a> -
<a href="README_cn.md">简体中文</a>
</p>
&nbsp;

**What is `compact.exe`?**
It's a commandlet with a collection of new algorithms introduced in Windows 10 that allow you to transparently compress games, programs and other folders with virtually no performance loss.

**Transparently? What does that mean?**
Transparent compression means that files can still be used normally on the computer as if nothing had happened - they don't get repackaged like Zip and Rar files do. You can still browse, launch games and programs exactly as you did before.
Transparent compression means that files can still be used normally on the computer as if nothing had happened - they don't get repackaged like Zip and Rar files do. You can still browse, launch games and programs exactly as you did before.

**How is this different from the built-in compression in older versions of Windows?**
This is similar to the NTFS-LZNT1 compression built-in to Windows (Right click > Properties > Compress to save space) however the newer algorithms introduced in Windows 10+ are far superior, resulting in greater compression ratios with almost no performance impact. Those with older HDDs may even see a performance gain in the form of reduced loading times - smaller files can be read into RAM faster, and the CPU can decompress them on the fly much faster than a typical HDD can supply them. [More information can be found here](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)


This is similar to the NTFS-LZNT1 compression built-in to Windows (Right click > Properties > Compress to save space) however the newer algorithms introduced in Windows 10+ are far superior, resulting in greater compression ratios with almost no performance impact. Those with older HDDs may even see a performance gain in the form of reduced loading times - smaller files can be read into RAM faster, and the CPU can decompress them on the fly much faster than a typical HDD can supply them. [More information can be found here](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)

<h2>Installation </h> <a href="https://github.com/ImminentFate/CompactGUI/releases"><img src="https://img.shields.io/github/release/ImminentFate/compactgui/all.svg""></a> <a href="https://github.com/ImminentFate/CompactGUI/releases"><img src="https://img.shields.io/github/downloads/ImminentFate/CompactGUI/total.svg""></a>

####

- <p>Download from <a href="https://github.com/IridiumIO/CompactGUI/releases"><b>GitHub Releases</b></a></p>
- Install using Winget `winget install CompactGUI`


## Uses
Use this tool to compress folders while still being able to use/run them normally:

Use this tool to compress folders while still being able to use/run them normally:

- Reduce the size of games (e.g. ARK-Survival Evolved: 169 GB > 91.2 GB)
- Reduce the size of programs (e.g. Adobe Photoshop: 1.71 GB > 886 MB)
- Compress any other folder on your computer

## Extra Features
- Visual feedback on compression progress and statistics
- Configurable list of poorly-compressed filetypes that can be skipped.
- Online integration with community-sourced [database](https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results) to get compression estimates
- Steam game results can be submitted to the online database from within CompactGUI
- Integration into Windows Explorer context menus for easier use.
- Analyze the status of existing folders
- Background Watcher - keeps track of folders and monitors them for changes (e.g. Steam game updates) and automatically keeps them compressed in the background.


- Visual feedback on compression progress and statistics
- Configurable list of poorly-compressed filetypes that can be skipped.
- Online integration with community-sourced [database](https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results) to get compression estimates
- Steam game results can be submitted to the online database from within CompactGUI
- Integration into Windows Explorer context menus for easier use.
- Analyze the status of existing folders
- Background Watcher - keeps track of folders and monitors them for changes (e.g. Steam game updates) and automatically keeps them compressed in the background.

<h4 align="center"><b>See the <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results">Wiki</a> for a list of <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results"><img src="https://img.shields.io/badge/9779-Games-blue.svg"></a> that have been tested from <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results"><img src="https://img.shields.io/badge/-82436-lightgrey.svg"></a> submissions</b></h3>
<p>&nbsp;</p>

<p align="center"><img src="https://github.com/IridiumIO/CompactGUI/assets/1491536/514bb3eb-55c4-488c-8731-61fcfa878dbd" width="250"/></p>
<p align="center"><img src="CompactGUI/assets/Watcher.png" width="750"/></p>

## Caveat
**This tool should not be used on games that utilise DirectStorage on Windows 11.**

DirectStorage is a new API that allows games to load assets directly from the SSD, bypassing the CPU. Compressed files will need to be decompressed before being sent to the GPU, which will negate any performance gains.

**This tool should not be used on games that utilise DirectStorage on Windows 11.**

DirectStorage is a new API that allows games to load assets directly from the SSD, bypassing the CPU. Compressed files will need to be decompressed before being sent to the GPU, which will negate any performance gains.

## Background

Windows 10 introduced a little-known but very useful tool called `compact.exe` that allows one to compress folders and files on disk, decompressing them at runtime. With any modern CPU (I have tested as old as an i3-370M from 2010 with negligible impact), this added load is hardly noticed, and the space savings are of most use on those with smaller SSDs.
Windows 10 introduced a little-known but very useful tool called `compact.exe` that allows one to compress folders and files on disk, decompressing them at runtime. With any modern CPU (I have tested as old as an i3-370M from 2010 with negligible impact), this added load is hardly noticed, and the space savings are of most use on those with smaller SSDs.

As program folders and games can be shrunk by up to 60%, this has the added bonus of potentially reducing load times - especially on slower HDDs.
As program folders and games can be shrunk by up to 60%, this has the added bonus of potentially reducing load times - especially on slower HDDs.

More information on the inbuilt Windows function can be found [here](https://technet.microsoft.com/en-au/library/bb490884.aspx) and [here](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx) or by typing `compact /q` into the commandline

This tool is intentionally designed to only compress folders and files. Whole drives and entire Windows installations cannot be modified from within CompactGUI - users seeking that functionality should use `compact /compactOS` from the commandline.
This tool is intentionally designed to only compress folders and files. Whole drives and entire Windows installations cannot be modified from within CompactGUI - users seeking that functionality should use `compact /compactOS` from the commandline.

The compression is fully transparent - programs, games and files can still be accessed as normal, and show up in Explorer as they normally would — they'll just be decompressed into RAM at runtime, staying compressed on disk.

## Options
By default, the program runs Compact with the `XPRESS8K` algorithm active. This provides a good balance between compression speed and size reduction. The default that Windows uses is `XPRESS4K` which is faster but compresses less.
The options available are:
- XPRESS4K: Fastest, but weakest
- XPRESS8K: Reasonable balance between speed and compression
- XPRESS16K: Slower, but stronger
- LZX: Slowest, but strongest - note it has a higher overhead, so use it on programs/games only if your CPU is reasonably strong or the program/game is older.


-----
### Like this project?
Please consider leaving a tip on Ko-Fi :)

## Compression Modes

By default, the program runs Compact with the `XPRESS8K` algorithm active. This provides a good balance between compression speed and size reduction. The default that Windows uses is `XPRESS4K` which is faster but compresses less.

Optional Compression Modes:

Algorithm|Core Advantages|Detailed Description
:---|:---|:---
XPRESS4K|Fastest, but weakest|Suitable for game files with extremely high read speed requirements, it can maximize performance while compressing.
XPRESS8K|Balance of speed and compression|A better balance has been achieved between compression speed and compression ratio.
XPRESS16K|Slower, but stronger|Suitable for scenarios with limited storage space and low loading speed requirements.
LZX|Slowest, but strongest|Suitable for storing archived files, backup data, or cold data that is not frequently accessed.

---

### Like this project?

Please consider leaving a tip on Ko-Fi :)

<p align="center"><a href='https://ko-fi.com/iridiumio' target='_blank'><img height='42' style='border:0px;height:42px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a></p>


95 changes: 95 additions & 0 deletions README_cn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<p align="center"><img src="https://github.com/IridiumIO/CompactGUI/assets/1491536/64f66b5d-0710-4f66-8b88-6a69f7eb9b63" width="500"></p>

&nbsp;

<p align="center"><b>CompactGUI 可以透明地压缩您的游戏和程序,减少它们占用的空间,同时不影响其功能。</br>它直接与 Win32 API 交互,实现与 Windows 10 及更高版本中提供的原生命令行工具 <code>compact.exe</code> 相同的功能。</b></p>
&nbsp;
&nbsp;

<p align="center"><img src="CompactGUI/assets/Home_zh.png" width="750"/></>

---
<p align="center">
<a href="README.md">English</a> -
<a href="README_cn.md">简体中文</a>
</p>
&nbsp;

**什么是 `compact.exe`?**
它是一个命令行工具,包含 Windows 10 中引入的新算法集合,可以让你几乎不损失性能的情况下透明地压缩游戏、程序和其他文件夹。

**透明?这是什么意思?**
透明压缩意味着文件仍然可以像以前一样在计算机上正常使用——它们不会像 Zip 和 Rar 文件那样被重新打包。您可以像以前一样浏览网页、启动游戏和程序。

**这和旧版 Windows 内置压缩有什么不同?**
这与 Windows 内置的 NTFS-LZNT1 压缩类似(右键点击 > 属性 > 压缩以节省空间),但是 Windows 10 及更高版本引入的新算法要优越得多,能够实现更高的压缩率,且几乎不会影响性能。对于拥有旧硬盘的用户来说,甚至可能看到性能提升,表现为加载时间减少——较小的文件可以更快地读入内存,而 CPU 能够比原本硬盘更快地即时解压缩它们。[更多信息请点击此处](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx)

<h2>安装 </h> <a href="https://github.com/ImminentFate/CompactGUI/releases"><img src="https://img.shields.io/github/release/ImminentFate/compactgui/all.svg""></a> <a href="https://github.com/ImminentFate/CompactGUI/releases"><img src="https://img.shields.io/github/downloads/ImminentFate/CompactGUI/total.svg""></a>

####

- <p>从 <a href="https://github.com/IridiumIO/CompactGUI/releases"><b>GitHub 发行版</b></a> 下载</p>
- 使用 Winget 安装: `winget install CompactGUI`

## 使用

使用此工具来压缩文件夹,同时还能正常使用/运行它们:

- 减小游戏的体积(例如:ARK-Survival Evolved: 169 GB > 91.2 GB)
- 减小程序的体积(例如:Adobe Photoshop: 1.71 GB > 886 MB)
- 压缩电脑上的任何文件夹

## 附加功能

- 压缩进度和统计信息的视觉反馈
- 可配置的不适合压缩文件类型列表,可以选择跳过。
- 在线获取社区来源的 [数据库](https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results) 以获取压缩预估结果
- Steam 游戏的压缩结果可以从 CompactGUI 内提交到在线数据库
- 集成到 Windows 资源管理器的上下文菜单中,以便更方便地使用。
- 分析现有文件夹的状态
- 后台监视器 - 跟踪文件夹并监视其变化(例如 Steam 游戏更新),并在后台自动对其进行压缩。

<h4 align="center"><br>已统计的游戏列表见 <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results">Wiki</a> <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results"><img src="https://img.shields.io/badge/9779-Games-blue.svg"></a></br></br>现在已提交的测试记录 <a href="https://github.com/ImminentFate/CompactGUI/wiki/Community-Compression-Results"><img src="https://img.shields.io/badge/-82436-lightgrey.svg"></a></b></h3>
<p>&nbsp;</p>

<p align="center"><img src="CompactGUI/assets/Watcher_zh.png" width="750"/></p>

## 注意

**此工具不适合用于使用 Windows 11 DirectStorage 的游戏。**

DirectStorage 是一种新的 API,它允许游戏直接从 SSD 加载资源,绕过 CPU。压缩文件需要先解压缩才能发送到 GPU,这会抵消任何性能提升。

## 背景

Windows 10 引入了一个鲜为人知但非常有用的工具,称为“compact.exe”,允许在运行时压缩磁盘上的文件夹和文件,进行解压。对于任何现代 CPU(我测试过 2010 年的 i3-370M,影响几乎不大),这种额外负载几乎不会被察觉,节省空间的优势在配备较小 SSD 的设备中最为实用。

由于程序文件夹和游戏可以大幅压缩,这还有一个额外好处,就是可能缩短加载时间——尤其是在慢速的机械硬盘上。

关于内置 Windows 功能的更多信息,请查看 [这里](https://technet.microsoft.com/en-au/library/bb490884.aspx) 和 [这里](https://msdn.microsoft.com/en-us/library/windows/desktop/hh920921(v=vs.85).aspx) 或在命令行中输入 `compact /q`

该工具设计时专门只压缩文件夹和文件。整个硬盘和整个 Windows 安装无法在 CompactGUI 内部修改——寻求此功能的用户应使用命令行中的`compact /compactOS`。

压缩完全透明——程序、游戏和文件仍可正常访问,并在资源管理器中显示,只是运行时解压到内存中,保持压缩在磁盘上。

## 压缩模式

默认情况下,程序运行 Compact 并启用“XPRESS8K”算法。这在压缩速度和体积减小之间取得了良好的平衡。Windows 默认是“XPRESS4K”,速度更快但压缩更少。

可选压缩模式:

算法|核心优势|详细介绍
:---|:---|:---
XPRESS4K|读取速度极快,压缩率合理|适合对读取速度要求极高的游戏文件,能够在压缩的同时最大化性能表现
XPRESS8K|压缩速度和压缩率双平衡|在压缩速度和压缩率之间取得了更好的平衡
XPRESS16K|高压缩率,处理速度较慢|适合用于存储空间紧张且对加载速度要求不高的场景
LZX|压缩率最高,解压速度最慢|适合用于存档文件、备份数据或不经常访问的冷数据存储

---

### 喜欢这个项目吗?

请考虑在 Ko-Fi 上打赏一下 :)

<p align="left"><a href='https://ko-fi.com/iridiumio' target='_blank'><img height='42' style='border:0px;height:42px;' src='https://cdn.ko-fi.com/cdn/kofi3.png?v=3' border='0' alt='Buy Me a Coffee at ko-fi.com' /></a></p>