Manpages - zip_set_file_compression.3
libzip (-lzip)
The
function sets the compression method for the file at position
in the zip archive to
with the compression method specific
The
is the same as returned by
For the
argument, currently only the following values are supported:
default compression; currently the same as
but
are ignored.
Store the file uncompressed.
Compress the file using the
algorithm.
Deflate the file with the
algorithm and default options.
Use the
algorithm for compression
Use the
algorithm for compression
Only the deflate and store methods can be assumed to be universally supported.
The
argument defines the compression level. This value is dependent on the compression algorithm. In general, lower numbers mean faster de/compression and higher numbers mean slower de/compression. For
and
1 is the fastest compression and 9 the best, 0 chooses the default. For
possible values are
to
Further compression method specific flags might be added over time.
The current compression method for a file in a zip archive can be determined using
Upon successful completion 0 is returned. Otherwise, -1 is returned and the error information in
is set to indicate the error.
fails if:
Unsupported compression method requested.
is not a valid file index in
or the argument combination is invalid.
Read-only zip file, no changes allowed.
was added in libzip 0.11.
and