From bc7bdee83ad44ece6b3d0518cf48ceec68337edf Mon Sep 17 00:00:00 2001 From: Dmitry Date: Tue, 20 Sep 2022 15:34:39 +0300 Subject: [PATCH] out compression: zstd --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index a099dd4..970f45e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -15,6 +15,7 @@ use tokio::sync::Mutex; const INPUT_FILENAME: &str = "baza_utf8.zip"; const OUTPUT_FILENAME: &str = "json.zip"; +const OUTPUT_COMPRESSION: Compression = Compression::Zstd; #[derive(Debug, Clone, Copy)] enum KeywordType { @@ -345,7 +346,7 @@ async fn zip_writer(queue: WriteQueue) { let mut outfilename = PathBuf::from(name); outfilename.set_extension("json"); let outfilename = outfilename.to_str().unwrap().to_string(); - let opts = EntryOptions::new(outfilename, Compression::Deflate); + let opts = EntryOptions::new(outfilename, OUTPUT_COMPRESSION); // write new zip entry writer