From 3a2ff368927e49cbba0f1215f0a32c2217ed86f3 Mon Sep 17 00:00:00 2001 From: Arata Date: Fri, 27 Sep 2024 11:37:00 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=A8=E3=82=AF=E3=83=9D=E3=83=BC=E3=83=88=E3=82=92deflate?= =?UTF-8?q?=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Cargo.lock | 44 ------------------- Cargo.toml | 7 +-- .../sos24-infrastructure/src/file_object.rs | 2 +- 3 files changed, 2 insertions(+), 51 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 14dc067..bf2be49 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -83,8 +83,6 @@ dependencies = [ "futures-io", "memchr", "pin-project-lite", - "zstd", - "zstd-safe", ] [[package]] @@ -612,11 +610,6 @@ name = "cc" version = "1.0.97" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "099a5357d84c4c61eb35fc8eafa9a79a902c2f76911e5747ced4e032edd8d9b4" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] [[package]] name = "cfg-if" @@ -1733,15 +1726,6 @@ version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" -[[package]] -name = "jobserver" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" -dependencies = [ - "libc", -] - [[package]] name = "js-sys" version = "0.3.69" @@ -4526,31 +4510,3 @@ name = "zeroize" version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" - -[[package]] -name = "zstd" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" -dependencies = [ - "zstd-safe", -] - -[[package]] -name = "zstd-safe" -version = "7.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml index 9852ded..d44fc6a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,12 +13,7 @@ edition = "2021" [workspace.dependencies] anyhow = "1.0.79" -async_zip = { version = "0.0.17", features = [ - "chrono", - "deflate", - "tokio", - "zstd", -] } +async_zip = { version = "0.0.17", features = ["chrono", "deflate", "tokio"] } axum = { version = "0.7.4", features = ["macros", "multipart", "query"] } aws-sdk-s3 = { version = "1.20.0", features = ["rt-tokio"] } base64 = "0.22.0" diff --git a/crates/sos24-infrastructure/src/file_object.rs b/crates/sos24-infrastructure/src/file_object.rs index 3313a7f..6c17dc4 100644 --- a/crates/sos24-infrastructure/src/file_object.rs +++ b/crates/sos24-infrastructure/src/file_object.rs @@ -143,7 +143,7 @@ impl FileObjectRepository for S3FileObjectRepository { .await .context("Failed to open file")?; - let zip_entry = ZipEntryBuilder::new(file_name.into(), Compression::Zstd) + let zip_entry = ZipEntryBuilder::new(file_name.into(), Compression::Deflate) .last_modification_date(updated_at.into()); let mut zip_entry_stream = zip_writer .write_entry_stream(zip_entry)