Can compress QCow2

This commit is contained in:
Pierre HUBERT 2025-05-29 14:22:09 +02:00
parent e869517bb1
commit 3ffc64f129

View File

@ -168,6 +168,16 @@ impl DiskFileInfo {
cmd
}
// Compress QCow2
(DiskFileFormat::QCow2 { .. }, DiskFileFormat::CompressedQCow2) => {
let mut cmd = Command::new(constants::GZIP_PROGRAM);
cmd.arg("--keep")
.arg("--to-stdout")
.arg(&self.file_path)
.stdout(File::create(&temp_file)?);
cmd
}
// Dumb copy of file
(a, b) if a == b => {
let mut cmd = Command::new(constants::COPY_PROGRAM);