"Fossies" - the Fresh Open Source Software Archive

Member "libzip-1.6.0/man/zip_source_zip.mdoc" (24 Jan 2020, 3635 Bytes) of package /linux/misc/libzip-1.6.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "zip_source_zip.mdoc": 1.5.2_vs_1.6.0.

    1 .\" zip_source_zip.mdoc -- create data source from zip file
    2 .\" Copyright (C) 2004-2019 Dieter Baron and Thomas Klausner
    3 .\"
    4 .\" This file is part of libzip, a library to manipulate ZIP archives.
    5 .\" The authors can be contacted at <libzip@nih.at>
    6 .\"
    7 .\" Redistribution and use in source and binary forms, with or without
    8 .\" modification, are permitted provided that the following conditions
    9 .\" are met:
   10 .\" 1. Redistributions of source code must retain the above copyright
   11 .\"    notice, this list of conditions and the following disclaimer.
   12 .\" 2. Redistributions in binary form must reproduce the above copyright
   13 .\"    notice, this list of conditions and the following disclaimer in
   14 .\"    the documentation and/or other materials provided with the
   15 .\"    distribution.
   16 .\" 3. The names of the authors may not be used to endorse or promote
   17 .\"    products derived from this software without specific prior
   18 .\"    written permission.
   19 .\"
   20 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS
   21 .\" OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
   22 .\" WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
   23 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
   24 .\" DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
   25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
   26 .\" GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
   27 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
   28 .\" IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
   29 .\" OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
   30 .\" IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
   31 .\"
   32 .Dd December 18, 2017
   33 .Dt ZIP_SOURCE_ZIP 3
   34 .Os
   35 .Sh NAME
   36 .Nm zip_source_zip
   37 .Nd create data source from zip file
   38 .Sh LIBRARY
   39 libzip (-lzip)
   40 .Sh SYNOPSIS
   41 .In zip.h
   42 .Ft zip_source_t *
   43 .Fn zip_source_zip "zip_t *archive" "zip_t *srcarchive" "zip_uint64_t srcidx" "zip_flags_t flags" "zip_uint64_t start" "zip_int64_t len"
   44 .Sh DESCRIPTION
   45 The function
   46 .Fn zip_source_zip
   47 creates a zip source from a file in a zip archive.
   48 The
   49 .Ar srcarchive
   50 argument is the (open) zip archive containing the source zip file
   51 at index
   52 .Ar srcidx .
   53 .Ar len
   54 bytes from offset
   55 .Ar start
   56 will be used in the zip_source.
   57 If
   58 .Ar len
   59 is 0 or \-1, the rest of the file, starting from
   60 .Ar start ,
   61 is used.
   62 If
   63 .Ar start
   64 is zero and
   65 .Ar len
   66 is \-1, the whole file will be copied without decompressing it.
   67 .Pp
   68 Supported flags are:
   69 .Bl -tag -width XZIPXFLXRECOMPRESSXXX
   70 .It Dv ZIP_FL_UNCHANGED
   71 Try to get the original data without any changes that may have been
   72 made to
   73 .Ar srcarchive
   74 after opening it.
   75 .It Dv ZIP_FL_RECOMPRESS
   76 When adding the data from
   77 .Ar srcarchive ,
   78 re-compress it using the current settings instead of copying the
   79 compressed data.
   80 .El
   81 .Sh RETURN VALUES
   82 Upon successful completion, the created source is returned.
   83 Otherwise,
   84 .Dv NULL
   85 is returned and the error code in
   86 .Ar archive
   87 is set to indicate the error.
   88 .Sh ERRORS
   89 .Fn zip_source_zip
   90 fails if:
   91 .Bl -tag -width Er
   92 .It Bq Er ZIP_ER_CHANGED
   93 Unchanged data was requested, but it is not available.
   94 .It Bq Er ZIP_ER_INVAL
   95 .Ar srcarchive ,
   96 .Ar srcidx ,
   97 .Ar start ,
   98 or
   99 .Ar len
  100 are invalid.
  101 .It Bq Er ZIP_ER_MEMORY
  102 Required memory could not be allocated.
  103 .El
  104 Additionally, it can return all error codes from
  105 .Fn zip_stat_index
  106 and
  107 .Fn zip_fopen_index .
  108 .Sh SEE ALSO
  109 .Xr libzip 3 ,
  110 .Xr zip_file_add 3 ,
  111 .Xr zip_file_replace 3 ,
  112 .Xr zip_source 3
  113 .Sh HISTORY
  114 .Fn zip_source_zip
  115 was added in libzip 1.0.
  116 .Sh AUTHORS
  117 .An -nosplit
  118 .An Dieter Baron Aq Mt dillo@nih.at
  119 and
  120 .An Thomas Klausner Aq Mt tk@giga.or.at