C / C ++ Windows + Linux ZIP for unpacking?

Continued: Standalone Cross Platform (Windows / Linux)) File Compression for C / C ++?

After many attempts at ZLIB ZZLIB LIBZIP MINIZIP, I always have a lot of problems at the compilation stage. Many of Google’s searches turned out to be OS-specific libraries, and I can’t find anything that matches my “simple” needs.

I reduced my library needs (or wrapper?):

  • Works with both Windows and Linux OR with two separate libraries; which works on Windows and the other on Linux, I can do two separate projects for Windows and Linux, if it is really necessary

  • Unzip the file from zip to the specified directory

  • Check if file exists in zip file

  • C OR C ++ OR Mixed (yes, it doesn't matter)

  • Preferably It’s very simple to include in any project (for example, files with 5 c / cpp and 1-3 header files? In any case, not a ton of files, when I open all the libzip and zlib archives, I have something like: "O my .. ")

I also checked a lot of threadoveflow threads with the words “Windows Linux ZIP C C ++”, but all the results seem to have libraries that I OR don’t know how to compile OR, it’s too difficult to use OR it has too much “necessary stuff” for simple zip firmware and check if the file exists.

I sent this project to a later date and started it now, and all these compilation errors occurred (especially that VC ++ 2010 does not have C-99 inttypes.h)

+4
source share
1 answer

I had very good experience with the Zipstream C ++ Library, which gives you a good OOP way to handle ZIP files.

If your project already uses some of the larger libraries, such as Boost , you can try using boost :: iostreams with the gzip filter, however, the functionality is somehow limited.

Or, if you use Poco , look at the implementation of Poco :: Zip p>

+1
source

Source: https://habr.com/ru/post/1397557/


All Articles