libzip icon indicating copy to clipboard operation
libzip copied to clipboard

Support pre compressed files

Open arsnyder16 opened this issue 3 years ago • 0 comments

Description

In some cases it would be useful to support pre compressed files being added to zip without compressing again, but at the same time allow the decompression to still work on open. The reverse already is possible in libzip, if i want to extract the compressed data directly i can use something like zip_fopen_index(zip_, index_, ZIP_FL_COMPRESSED)

Solution One option would be to leverage the compression flags of on zip_set_file_compression.
zip_set_file_compression(zip_, index, ZIP_CM_STORE, ZIP_CM_DEFLATE); For example i have a pre deflated file that i want to just store, but i want to make sure the index reports that the content is deflated when opening.

Describe alternatives you've considered I looked through the code to see if there were any existing hooks and found nothing that stood out.

Additional context

arsnyder16 avatar Mar 31 '22 15:03 arsnyder16