Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No effect on compression level: LZMA2Options::with_preset() #56

Open
VictorieeMan opened this issue Feb 9, 2024 · 0 comments
Open

No effect on compression level: LZMA2Options::with_preset() #56

VictorieeMan opened this issue Feb 9, 2024 · 0 comments

Comments

@VictorieeMan
Copy link

Hi, I was running the following example:

let outputArchive = format!("{}.aes.7z",inputFolder);
let mut sz: SevenZWriter<File> = SevenZWriter::create(outputArchive2).expect("create writer ok");
sz.set_content_methods(vec![
    sevenz_rust::AesEncoderOptions::new("sevenz-rust".into()).into(),
    lzma::LZMA2Options::with_preset(0).into(),
]);
sz.push_source_path(inputFolder, |_| true).expect("pack ok");

sz.finish().expect("compress ok");

and tested around over some different values in with_preset(). My assumption was that 0 would be no compression and 9 would be maximum compression. But no matter the setting, I got the same amount of compression for every entered number. No matter what setting, the compressed folder ends up being 23% of the original. My expectation was that with_preset(0) would not preform any compression at all in this case, but rather just bundle the files together.

Am I misunderstanding something about the implementation on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant