diff options
author | Yi Kong <yikong@google.com> | 2021-05-25 01:59:51 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-05-25 01:59:51 +0000 |
commit | 523565e4f57dcb073d7d13c9c3f24e2ab45274d8 (patch) | |
tree | 13b4f5353549a8b15061faa21aa03e181d9c37f1 | |
parent | 08e565a8ceddfe5052c572d6d7a010018a4c89d8 (diff) | |
parent | c4d103c8757dcf7b9024855795854d9eb9c73650 (diff) | |
download | extras-523565e4f57dcb073d7d13c9c3f24e2ab45274d8.tar.gz |
profcollectd: Compress profile reports am: c4d103c875
Original change: https://googleplex-android-review.googlesource.com/c/platform/system/extras/+/14703273
Change-Id: I14a00898939e1dfe6c799494b6990e3cbc65e391
-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)? |