out compression: zstd

This commit is contained in:
Dmitry Belyaev 2022-09-20 15:34:39 +03:00
parent 61587132a3
commit bc7bdee83a
Signed by: b4tman
GPG Key ID: 41A00BF15EA7E5F3

View File

@ -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