Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

mbtool: installer_util.cpp: Set maximum compression level for ramdisk #1400

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
7 changes: 7 additions & 0 deletions mbtool/src/recovery/installer_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,13 @@ bool InstallerUtil::pack_ramdisk(const std::string &input_dir,

archive_write_set_bytes_per_block(aout.get(), 512);

// Enable maximum compression for each supported filter
if (archive_write_set_filter_option(
aout.get(), nullptr, "compression-level", "9") != ARCHIVE_OK) {
LOGW("%s: Failed to set compression level: %s",
output_file.c_str(), archive_error_string(aout.get()));
}

// Open output file
if (archive_write_open_filename(aout.get(), output_file.c_str())
!= ARCHIVE_OK) {
Expand Down