ctabin / libzippp

C++ wrapper for libzip
Other
376 stars 93 forks source link

Add the possibility to set the compression level #187

Closed fdgStilla closed 1 year ago

fdgStilla commented 1 year ago

I was comparing the performance between 7zip and libzippp and I noticed that 7zip was way faster than libzippp. By looking at the result archive, it appears the compression level is not the same (Deflate normal I guess for 7zip and Deflate:Maximum for libzippp). With 7zip it is possible to set the compression level between 1 and 9. This is also possible with the underlying library libzip.

However it seems the compression level is always set to the default value (zip_set_file_compression is called with flag=0) in libzippp. It would be very useful to be able to set the compression level from libzippp. The time to compress between level 1 and 9 can be x10 so it is very important for us when we manipulate an archive of images of several GB.

Thanks for your library !