Can compress QCow2
This commit is contained in:
@@ -168,6 +168,16 @@ impl DiskFileInfo {
|
|||||||
cmd
|
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
|
// Dumb copy of file
|
||||||
(a, b) if a == b => {
|
(a, b) if a == b => {
|
||||||
let mut cmd = Command::new(constants::COPY_PROGRAM);
|
let mut cmd = Command::new(constants::COPY_PROGRAM);
|
||||||
|
Reference in New Issue
Block a user