Skip to content

Commit 91664e2

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 ad60625 commit 91664e2

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

3rdparty/clipzipplugin/clipzipplugin.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -190,16 +190,13 @@ 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+
arguments << "-l" << "1";
194+
Q_UNUSED(options.iCompressionLevel);
197195

198196
// 线程数:只有大于1时才指定,否则让 pzip 自动使用全部 CPU 核心
199197
if (options.iCPUTheadNum > 1) {
200198
arguments << "-c" << QString::number(options.iCPUTheadNum);
201199
}
202-
// 注意:iCPUTheadNum <= 1 时不传 -c 参数,pzip 默认使用全部核心
203200

204201
// 输出文件
205202
arguments << m_strArchiveName;

0 commit comments

Comments
 (0)