Fix: [7z-compress] Optimize the default 7z compression efficiency.#315
Merged
deepin-bot[bot] merged 1 commit intolinuxdeepin:develop/snipefrom Nov 20, 2025
Merged
Conversation
-- Optimize the default 7z compression efficiency. Log: fix issue Bug: https://pms.uniontech.com/bug-view-287203.html
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThe PR improves default 7z compression efficiency by explicitly setting the compression level when initializing a 7z archive operation. Sequence diagram for setting 7z compression level during archive creationsequenceDiagram
participant MainWindow
participant CompressOptions
participant 7zArchive
MainWindow->>CompressOptions: set iCompressionLevel = 1
MainWindow->>7zArchive: initialize with CompressOptions
7zArchive->>7zArchive: use iCompressionLevel = 1 for compression
Class diagram for updated CompressOptions usage in 7z compressionclassDiagram
class CompressOptions {
int iCompressionLevel
// other attributes
}
class MainWindow {
slotFinishCalculateSize(size, strArchiveFullPath, listAddEntry, stOptions, listAllEntry)
}
MainWindow --> CompressOptions: uses
CompressOptions <.. 7zArchive: passed to
class 7zArchive {
// uses CompressOptions.iCompressionLevel
}
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这段代码变更进行审查:
改进建议: void MainWindow::slotFinishCalculateSize(qint64 size, QString strArchiveFullPath, QList<FileEntry> listAddEntry, CompressOptions stOptions, QList<FileEntry> listAllEntry)
{
if (StartupType::ST_Compresstozip7z == m_eStartupType) {
// 对于 zip7z 格式,使用最低压缩级别以确保兼容性和速度
stOptions.iCompressionLevel = CompressionLevel::LOWEST; // 建议定义常量
#ifdef DTKCORE_CLASS_DConfigFile
if (m_pCompressSettingPage->isOrderMode()) {
DConfig *dconfig = DConfig::create("org.deepin.compressor","org.deepin.compressor.method");建议:
namespace CompressionLevel {
const int LOWEST = 1;
const int NORMAL = 5;
const int HIGHEST = 9;
}
|
lzwind
approved these changes
Nov 20, 2025
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: GongHeng2017, lzwind The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Contributor
Author
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
-- Optimize the default 7z compression efficiency.
Log: fix issue
Bug: https://pms.uniontech.com/bug-view-287203.html
Summary by Sourcery
Bug Fixes: