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
623 stars 113 forks source link

Custom read/write handlers from user #29

Closed kenkit closed 2 years ago

kenkit commented 4 years ago

Describe the solution you'd like Should allow user to set custom read/write handlers e.g when user wants to set http archive reading.

Additional context (optional) This will make the library much more flexible and powerfull. E.g user can set ftp/http archive url and the library should be able to list/extract without downloading the full archive via custom handlers.

kenkit commented 4 years ago

Something like libarchive custom read function example. EDIT:More info LibarchiveIO

rikyoz commented 4 years ago

It might be an interesting functionality to support. Surely it requires several changes, both internally and in the external API, so it will not be released in the next stable version (v3.1). Perhaps in the next major release (v4.0), but I need to study it more deeply and for now I'm concentrating on other features (like the support to Linux and p7zip).

E.g user can set ftp/http archive url and the library should be able to list/extract without downloading the full archive via custom handlers.

From v3.1 bit7z supports extraction/metadata reading from std::istream. Are you sure this doesn't fit your use case?

kenkit commented 4 years ago

I have not tried it. but I'll look into it. I appreciate your quick response all the same.

kenkit commented 4 years ago

My guess is this feature goes hand in hand with linux compatibility of the library.

kenkit commented 2 years ago

Istream will work just fine. Was just doing something with boost iostreams.