dsoprea / PyEasyArchive

A very intuitive and useful adapter to libarchive for universal archive access.
MIT License
96 stars 33 forks source link

Is it possible to update .7z archive in-place? #40

Closed pengyu closed 4 years ago

pengyu commented 5 years ago

I'd like to try libarchive with .7z. But I need to update the archive inplace instead of copy the rest content from the old archive to the new archive then add the new file to the new archive. Is it possible to use libarchive to update .7z inplace?

dsoprea commented 4 years ago

Not to my knowledge, but I'm not sure. The main libarchive include-file doesn't have anything named "copy" or "update". Feel free to investigate whether libarchive can support it and then we can revisit the idea. Given that libarchive is a general interface and not all archives support updating, it may be a tradeoff for using libarchive rather than something more specific (though there didn't used to be any other options for 7-Zip).