-
Notifications
You must be signed in to change notification settings - Fork 37
Fix: [7z-compress] Optimize the default 7z compression efficiency. #315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix: [7z-compress] Optimize the default 7z compression efficiency. #315
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
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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;
}
|
|
[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 |
|
/merge |
-- Optimize the default 7z compression efficiency.
Log: fix issue
Bug: https://pms.uniontech.com/bug-view-287203.html
Summary by Sourcery
Bug Fixes: