Skip to content

Commit 2824168

Browse files
authored
fix: use zstd instead of gzip for data source requests (#61)
Data services already respond with content-encoding: zstd. Switch reqwest client from gzip to zstd for better compression ratio and faster decompression.
1 parent fbd871d commit 2824168

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/data-client/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77
anyhow = { workspace = true, features = ["std"] }
88
bytes = { workspace = true }
99
futures = { workspace = true }
10-
reqwest = { workspace = true, features = ["gzip", "json", "stream"] }
10+
reqwest = { workspace = true, features = ["zstd", "json", "stream"] }
1111
serde = { workspace = true, features = ["derive"] }
1212
serde_json = { workspace = true }
1313
sqd-primitives = { path = "../primitives", features = ["serde"] }

crates/data-client/src/reqwest/client.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub fn default_http_client() -> Client {
1919
Client::builder()
2020
.read_timeout(Duration::from_secs(20))
2121
.connect_timeout(Duration::from_secs(20))
22-
.gzip(true)
22+
.zstd(true)
2323
.build()
2424
.unwrap()
2525
}

0 commit comments

Comments
 (0)