diff options
author | Yi Kong <yikong@google.com> | 2021-05-25 01:58:09 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-25 01:58:09 +0000 |
commit | ffa138b8f985958fabafc8993eb0f8424ee6c627 (patch) | |
tree | 13b4f5353549a8b15061faa21aa03e181d9c37f1 | |
parent | f4c20df5e0e2cd77806416719c76ce39cece4bff (diff) | |
parent | c4d103c8757dcf7b9024855795854d9eb9c73650 (diff) | |
download | extras-ffa138b8f985958fabafc8993eb0f8424ee6c627.tar.gz |
profcollectd: Compress profile reports am: c4d103c875
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/extras/+/14703273
Change-Id: Ia3004838fba0a376136dbb52f92b805898d73677
-rw-r--r-- | profcollectd/libprofcollectd/report.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/profcollectd/libprofcollectd/report.rs b/profcollectd/libprofcollectd/report.rs index 2c524729..f3b8fe12 100644 --- a/profcollectd/libprofcollectd/report.rs +++ b/profcollectd/libprofcollectd/report.rs @@ -27,6 +27,7 @@ use std::time::SystemTime; 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 @@ pub fn pack_report(profile: &Path, report: &Path, config: &Config) -> Result<Str // 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)? |