1ZIP_SOURCE_ZIP(3)          Library Functions Manual          ZIP_SOURCE_ZIP(3)
2
3
4

NAME

6       zip_source_zip - create data source from zip file
7

LIBRARY

9       libzip (-lzip)
10

SYNOPSIS

12       #include <zip.h>
13
14       struct  zip_source  *  zip_source_zip(struct  zip  *archive, struct zip
15       *srcarchive); "int srcidx" "int flags" "off_t start" "off_t len"
16

DESCRIPTION

18       The function zip_source_zip creates a zip source from a file in  a  zip
19       archive.   The srcarchive argument is the (open) zip archive containing
20       the source zip file at index srcidx.  len bytes from offset start  will
21       be  used  in  the zip_source.  If len is 0 or -1, the rest of the file,
22       starting from start, is used.  If start is zero  and  len  is  -1,  the
23       whole file will be copied without decompressing it.
24
25       Supported flags are:
26
27              ZIP_FL_UNCHANGED       Try  to get the original data without any
28                                     changes  that  may  have  been  made   to
29                                     srcarchive after opening it.
30
31              ZIP_FL_RECOMPRESS      When adding the data from srcarchive, re-
32                                     compress it using  the  current  settings
33                                     instead of copying the compressed data.
34

RETURN VALUES

36       Upon successful completion, the created source is returned.  Otherwise,
37       NULL is returned and the error code in archive is set to  indicate  the
38       error.
39

ERRORS

41       zip_source_zip fails if:
42
43              [ZIP_ER_CHANGED]
44                  Unchanged data was requested, but it is not available.
45
46              [ZIP_ER_INVAL]
47                  srcarchive, srcidx, start, or len are invalid.
48
49              [ZIP_ER_MEMORY]
50                  Required memory could not be allocated.
51       Additionally,  it  can  return  all error codes from zip_stat_index and
52       zip_fopen_index.
53

SEE ALSO

55       libzip(3),    zip_add(3),     zip_replace(3),     zip_source_buffer(3),
56       zip_source_file(3),       zip_source_filep(3),      zip_source_free(3),
57       zip_source_function(3)
58

AUTHORS

60       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
61
62
63
64NiH                              June 4, 2008                ZIP_SOURCE_ZIP(3)
Impressum