Skip to content

Commit 16083ee

Browse files
feat: Force compression level in clipzipplugin for improved performance
- Updated clipzipplugin to enforce a compression level of 1, prioritizing speed over user-defined settings. - Removed the option to specify compression levels from the GUI, simplifying the configuration for optimal performance. Log: Enhance performance by standardizing compression level in clipzipplugin bug: https://pms.uniontech.com/bug-view-346679.html
1 parent 9419d09 commit 16083ee

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

3rdparty/clipzipplugin/clipzipplugin.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ PluginFinishType CliPzipPlugin::addFiles(const QList<FileEntry> &files, const Co
190190
// 静默模式
191191
arguments << "-q";
192192

193-
// 压缩级别(如果指定)
194-
if (options.iCompressionLevel >= 1 && options.iCompressionLevel <= 9) {
195-
arguments << "-l" << QString::number(options.iCompressionLevel);
196-
}
193+
// 压缩级别:强制使用 level 1(最快速度),忽略 GUI 设置
194+
// pzip 的优势是并行压缩,level 1 已经有很好的压缩率
195+
arguments << "-l" << "1";
196+
Q_UNUSED(options.iCompressionLevel); // 忽略 GUI 传递的压缩级别
197197

198198
// 线程数:只有大于1时才指定,否则让 pzip 自动使用全部 CPU 核心
199199
if (options.iCPUTheadNum > 1) {

0 commit comments

Comments
 (0)