Skip to content

Commit a412545

Browse files
chore(preprod): Use zstd for zip compression
1 parent 775efe4 commit a412545

File tree

4 files changed

+60
-56
lines changed

4 files changed

+60
-56
lines changed

Cargo.lock

Lines changed: 56 additions & 52 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ uuid = { version = "1.3.0", features = ["v4", "serde"] }
7070
walkdir = "2.3.2"
7171
which = "4.4.0"
7272
whoami = "1.5.2"
73-
zip = "2.4.2"
73+
zip = { version = "6.0.0", features = ["zstd"] }
7474
data-encoding = "2.3.3"
7575
magic_string = "0.3.4"
7676
chrono-tz = "0.8.4"

src/commands/build/upload.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -563,7 +563,7 @@ fn normalize_file(
563563
// This is important as an optimization to avoid re-uploading the same chunks if they're already on the server
564564
// but the last modified time being different will cause checksums to be different.
565565
let options = SimpleFileOptions::default()
566-
.compression_method(zip::CompressionMethod::Stored)
566+
.compression_method(zip::CompressionMethod::Zstd)
567567
.last_modified_time(DateTime::default());
568568

569569
zip.start_file(file_name, options)?;

src/utils/build/normalize.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ fn add_entries_to_zip(
5555
// This is important as an optimization to avoid re-uploading the same chunks if they're already on the server
5656
// but the last modified time being different will cause checksums to be different.
5757
let options = SimpleFileOptions::default()
58-
.compression_method(zip::CompressionMethod::Deflated)
58+
.compression_method(zip::CompressionMethod::Zstd)
5959
.last_modified_time(DateTime::default());
6060

6161
for (entry_path, relative_path) in entries {
@@ -88,7 +88,7 @@ fn add_entries_to_zip(
8888

8989
fn metadata_file_options() -> SimpleFileOptions {
9090
SimpleFileOptions::default()
91-
.compression_method(zip::CompressionMethod::Deflated)
91+
.compression_method(zip::CompressionMethod::Zstd)
9292
.last_modified_time(DateTime::default())
9393
}
9494

0 commit comments

Comments
 (0)