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

[Feature Request]: Creation or extraction archive file in one line #188

Open
1 task done
davidds1990 opened this issue Jan 29, 2024 · 1 comment
Open
1 task done
Assignees

Comments

@davidds1990
Copy link

davidds1990 commented Jan 29, 2024

Feature description

Hi
Can you provide a static function that takes the same arguments as the 7z CLI App? (Similar to the main function in 7z)
This function can be very useful (creation or extraction archive file in one line).

CLI:

7z.exe x archive.7z
7z.exe a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on -mhe=on -p"Hello world!" archive.7z your_dir

Static function (for example):

int ret = bit7z::cli7z("7z.dll", "x archive.7z");
int ret = bit7z::cli7z("7z.dll", "a -t7z -m0=lzma2 -mx=9 -mfb=64 -md=64m -ms=on -mhe=on -p\"Hello world!\" archive.7z your_dir");

Additional context

No response

Code of Conduct

@rikyoz
Copy link
Owner

rikyoz commented Jan 29, 2024

Hi!
Unfortunately, the 7-Zip DLLs do not provide a direct way to execute the CLI arguments, so bit7z would need to implement a parser that, given the string of arguments, will execute the corresponding command with the given options.
It's not a top priority for the project, as I still need to implement some missing and complex features, but I'll definitely evaluate providing such functionality.
Thanks for pointing it out!

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

No branches or pull requests

2 participants