Update description for zip_set_file_compression and link to it from libzip.mdoc. --HG-- branch : HEAD
diff --git a/man/zip_set_file_compression.mdoc b/man/zip_set_file_compression.mdoc index 0036a1a..ee8a4b1 100644 --- a/man/zip_set_file_compression.mdoc +++ b/man/zip_set_file_compression.mdoc
@@ -1,5 +1,5 @@ .\" zip_set_file_compression.mdoc -- set compression method and its flags -.\" Copyright (C) 2011 Dieter Baron and Thomas Klausner +.\" Copyright (C) 2012 Dieter Baron and Thomas Klausner .\" .\" This file is part of libzip, a library to manipulate ZIP files. .\" The authors can be contacted at <libzip@nih.at> @@ -29,12 +29,12 @@ .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 17, 2011 +.Dd January 17, 2012 .Dt ZIP_SET_FILE_COMPRESSION 3 .Os .Sh NAME .Nm zip_set_file_compression -.Nd set compression method and corresponding options for file in zip +.Nd set compression method for file in zip .Sh LIBRARY libzip (-lzip) .Sh SYNOPSIS @@ -57,19 +57,30 @@ .Xr zip_stat 3 . For the .Ar comp -argument, currently only the -.\" XXX: adapt to real defines -.Dv DEFLATE -and -.Dv STORE -methods are supported. +argument, currently only the following values are supported: +.Bl -tag -width ZIP_CM_DEFLATE_XX +.It Dv ZIP_CM_DEFAULT +default compression; currently the same as +.Dv ZIP_CM_DEFLATE . +.It Dv ZIP_CM_STORE +Store the file uncompressed. +.It Dv ZIP_CM_DEFLATE +Deflate the file with the +.Xr zlib 3 +algorithm and default options +.El .Pp -For the flags argument, the lower 4 bits define the compression -level. -0 is fastest compression, 15 is highest compression -.Dv ZIP_COMP_FL_DEFAULT -can be used to specify that the default shall be used. -Further compression method specific flags will be added over time. +The flags argument is currently ignored. +.\" For the flags argument, the lower 4 bits define the compression +.\" level. +.\" 0 is fastest compression, 15 is highest compression +.\" .Dv ZIP_COMP_FL_DEFAULT +.\" can be used to specify that the default shall be used. +.\" Further compression method specific flags will be added over time. +.Pp +The current compression method for a file in a zip archive can be +determined using +.Xr zip_stat 3 . .Sh RETURN VALUES Upon successful completion 0 is returned. Otherwise, \-1 is returned and the error information in @@ -84,8 +95,10 @@ is not a valid file index in .Ar archive , or the argument combination is invalid. -.\" .It Bq Er ZIP_ER_MEMORY -.\" Required memory could not be allocated. +.It Bq Er ZIP_ER_COMPNOTSUPP +Unsupported compression method requested. +.It Bq Er ZIP_ER_RDONLY +Read-only zip file, no changes allowed. .El .Sh SEE ALSO .Xr libzip 3 ,