profcollectd: Compress profile reports
Test: build
Bug: 187671217
Change-Id: Ie73f0c545d3e150fd43649e8bc9d4de167b9a0a5
diff --git a/profcollectd/libprofcollectd/report.rs b/profcollectd/libprofcollectd/report.rs
index 2c52472..f3b8fe1 100644
--- a/profcollectd/libprofcollectd/report.rs
+++ b/profcollectd/libprofcollectd/report.rs
@@ -27,6 +27,7 @@
use uuid::v1::{Context, Timestamp};
use uuid::Uuid;
use zip::write::FileOptions;
+use zip::CompressionMethod::Deflated;
use zip::ZipWriter;
use crate::config::Config;
@@ -47,7 +48,7 @@
// Set report file ACL bits to 644, so that this can be shared to uploaders.
// Who has permission to actually read the file is protected by SELinux policy.
let report = fs::OpenOptions::new().create_new(true).write(true).mode(0o644).open(&report)?;
- let options = FileOptions::default();
+ let options = FileOptions::default().compression_method(Deflated);
let mut zip = ZipWriter::new(report);
fs::read_dir(profile)?