Linux cli command zip_set_file_compression
2 minute read
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.
Only the deflate and store methods can be assumed to be universally supported.
The
argument defines the compression level, 1 being fastest compression and 9 highest. Allowed values are 0 (which uses the default compression for the algorithm) and 1-9, other values are undefined. 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
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
█║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌
██╗ ██╗ ██████╗ ██████╗ ██╗ ██╗███████╗██████╗
████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
╚██╔═██╔╝██║ ██║██║ ██║ ╚███╔╝ █████╗ ██║ ██║
████████╗██║ ██║██║ ██║ ██╔██╗ ██╔══╝ ██║ ██║
╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
╚═╝ ╚═╝ ╚═════╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═════╝
█║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.