rikyoz / bit7z

A C++ static library offering a clean and simple interface to the 7-zip shared libraries.
https://rikyoz.github.io/bit7z
Mozilla Public License 2.0
611 stars 112 forks source link

[Feature Request]: provide a way to set options or parameters #103

Closed pabloglombovsky closed 9 months ago

pabloglombovsky commented 1 year ago

Feature description

I need to avoid storing the NTFS extra field (where the last accessed, modified, and created times are stored). I saw that one way to do it in 7zip was to use the -mtc=off parameter. I did not find any way to do it when creating a .zip file using this library. Is there any way? Thanks

Additional context

No response

Code of Conduct

rikyoz commented 1 year ago

Hi!

I did not find any way to do it when creating a .zip file using this library. Is there any way?

Unfortunately, no, it's not possible with the library's current versions (stable and beta).

However, I'll probably add this option to the library's next version. The change should not take much effort in itself, but I'm thinking of providing a more general way to set custom 7-zip parameters.

pabloglombovsky commented 1 year ago

Hi Riccardo, One question about the 7zip wrapper. In 7 zip there is no way to encrypt a file (using the .zip format) using a password that contains Asian characters or even accentuated characters (any character beyond the ASCII 127). Do you know if there is a way using your library to bypass this? Thanks

On Sun, Oct 23, 2022 at 12:21 PM Riccardo @.***> wrote:

Hi!

I did not find any way to do it when creating a .zip file using this library. Is there any way?

Unfortunately, no, it's not possible with the library's current versions (stable and beta).

However, I'll probably add this option to the library's next version. The change should not take much effort in itself, but I'm thinking of providing a more general way to set custom 7-zip parameters.

— Reply to this email directly, view it on GitHub https://github.com/rikyoz/bit7z/issues/103#issuecomment-1288136671, or unsubscribe https://github.com/notifications/unsubscribe-auth/AT6WNZQTO7DG27ORSV3XKN3WEVJYNANCNFSM6AAAAAARHGXQHQ . You are receiving this because you authored the thread.Message ID: @.***>

rikyoz commented 1 year ago

Hi!

Do you know if there is a way using your library to bypass this?

Unfortunately, I don't think there's any way to bypass this limitation unless you directly modify the 7-zip source code. I did some quick tests, and bit7z fails when using Asian/accentuated characters for .zip passwords: this is due to the internal calls to 7-zip failing, so I don't think there's much that bit7z can do in this case, I'm sorry!

rikyoz commented 9 months ago

Implemented in v4.0.0.