respect compession level

This commit is contained in:
slonkazoid 2024-04-21 00:46:28 +03:00
parent 5930df6609
commit 64954a3d5c
Signed by: slonk
SSH key fingerprint: SHA256:tbZfJX4IOvZ0LGWOWu5Ijo8jfMPi78TU7x1VoEeCIjM

View file

@ -335,7 +335,11 @@ async fn main() -> eyre::Result<()> {
let cache_file = cache_file.into_std().await;
tokio::task::spawn_blocking(move || {
std::io::Write::write_all(
&mut zstd::stream::write::Encoder::new(cache_file, 3)?.auto_finish(),
&mut zstd::stream::write::Encoder::new(
cache_file,
config.cache.compression_level,
)?
.auto_finish(),
&serialized,
)
})