Open erenturkm opened 11 months ago
@erenturkm Did you run this code in release mode?
No, it was debug mode, I tried it with release mode and its taking 4.2 seconds which is still less than %25 speed of the original archiver. Since I will be using it for very large text files (100MB+), I need a solution that is minimum %75 slower, preferably better than the original solution.
At present, the compression speed can only be increased by reducing the compression rate.But the compressed file will also become larger
zip.set_content_methods(vec![
LZMA2Options::with_preset(3).into(),//preset: from 1 to 9, default 6
]);
Hi,
I am using sevenz-rust version 0.4.3, with Rust 1.71 on Windows. I am using the code below: ` use std::path::{Path, PathBuf}; use std::fs::{File,OpenOptions}; use sevenz_rust::lzma::{LZMA2Options ,LZMA2Reader,LZMA2Writer}; use sevenz_rust::{SevenZReader, SevenZWriter, Password, SevenZArchiveEntry}; use std::{process::exit}; use std::time::Instant;
fn main() { let verb_duration=Instant::now(); let file_name="testdir\folder1\file3.txt"; let file_path=PathBuf::from(file_name);
} ` file3.txt is a 50MB text file and above code takes 54 seconds to generate 9 KB file. When I use 7zip archiver, it takes less than a second and generates 9KB file. I am hoping that there is a setting that I am missing to speed things up?