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

Can I get the Options of a ZipArchive so I can reuse it for ZipWriter? #173

Open
gdamjan opened this issue Jan 31, 2022 · 3 comments
Open
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@gdamjan
Copy link

gdamjan commented Jan 31, 2022

I'm making an app where I read a zip file, make some modifications, and write a new file,
I'd like to keep the same options (as much as possible) of the input file.

Can I somehow read the option from ZipArchive to reuse it instead of zip::write::FileOptions::default() ?

@zamazan4ik zamazan4ik added the question Further information is requested label Feb 14, 2022
@zamazan4ik
Copy link
Contributor

@Plecra do you have any ideas? I am not so familiar with the API yet :(

@Plecra
Copy link
Member

Plecra commented Feb 17, 2022

Sure, you can reconstruct a FileOptions from the accessor methods on a ZipArchive. There isn't any way to get a fully prepared FileOptions, though.

@Plecra
Copy link
Member

Plecra commented Feb 1, 2023

We shoulld make this possible! FileOptions::for_file(&ZipFile) should be easy enough ^^

@Plecra Plecra added enhancement New feature or request help wanted Extra attention is needed and removed question Further information is requested labels Feb 1, 2023
@Pr0methean Pr0methean transferred this issue from zip-rs/zip-old Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants