zip.SetFileCompression(id, idx, method[, flags])
idx
in the zip archive
specified by id
to the compression method specified in method
. The optional flags
argument
can be used to define the compression level, 1 being fastest compression and 9 highest. Allowed
values are 1-9 or 0 to use the compressor's default setting.
The method
parameter must be one of the following constants:
#ZIP_CM_DEFAULT:
#ZIP_CM_DEFLATE
.
#ZIP_CM_STORE:
#ZIP_CM_BZIP2:
#ZIP_CM_DEFLATE:
Note that only #ZIP_CM_DEFLATE
and #ZIP_CM_STORE
can be assumed to be universally supported.
Also note that the change to the zip archive isn't done immediately but is postponed until you call zip.CloseArchive().