From 0e1829650b166e9204022d11e33bc387c0390e90 Mon Sep 17 00:00:00 2001 From: Eugene Formanenko Date: Wed, 25 Mar 2026 11:49:01 +0400 Subject: [PATCH] fix: use zstd instead of gzip for data source requests Data services already respond with content-encoding: zstd. Switch reqwest client from gzip to zstd for better compression ratio and faster decompression. --- crates/data-client/Cargo.toml | 2 +- crates/data-client/src/reqwest/client.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/data-client/Cargo.toml b/crates/data-client/Cargo.toml index 98554b29..539fc215 100644 --- a/crates/data-client/Cargo.toml +++ b/crates/data-client/Cargo.toml @@ -7,7 +7,7 @@ edition = "2021" anyhow = { workspace = true, features = ["std"] } bytes = { workspace = true } futures = { workspace = true } -reqwest = { workspace = true, features = ["gzip", "json", "stream"] } +reqwest = { workspace = true, features = ["zstd", "json", "stream"] } serde = { workspace = true, features = ["derive"] } serde_json = { workspace = true } sqd-primitives = { path = "../primitives", features = ["serde"] } \ No newline at end of file diff --git a/crates/data-client/src/reqwest/client.rs b/crates/data-client/src/reqwest/client.rs index b4d1c6d5..f59308f0 100644 --- a/crates/data-client/src/reqwest/client.rs +++ b/crates/data-client/src/reqwest/client.rs @@ -19,7 +19,7 @@ pub fn default_http_client() -> Client { Client::builder() .read_timeout(Duration::from_secs(20)) .connect_timeout(Duration::from_secs(20)) - .gzip(true) + .zstd(true) .build() .unwrap() }