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.  If flags is
24       ZIP_FL_UNCHANGED, zip_source_zip will try  to  get  the  original  data
25       without any changes that may have been made to srcarchive after opening
26       it.
27

RETURN VALUES

29       Upon successful completion, the created source is returned.  Otherwise,
30       NULL  is  returned and the error code in archive is set to indicate the
31       error.
32

ERRORS

34       zip_source_zip fails if:
35
36              [ZIP_ER_CHANGED]
37                  Unchanged data was requested, but it is not available.
38
39              [ZIP_ER_INVAL]
40                  srcarchive, srcidx, start, or len are invalid.
41
42              [ZIP_ER_MEMORY]
43                  Required memory could not be allocated.
44       Additionally, it can return all error  codes  from  zip_stat_index  and
45       zip_fopen_index.
46

SEE ALSO

48       libzip(3),     zip_add(3),     zip_replace(3),    zip_source_buffer(3),
49       zip_source_file(3),      zip_source_filep(3),       zip_source_free(3),
50       zip_source_function(3)
51

AUTHORS

53       Dieter Baron <dillo@giga.or.at> and Thomas Klausner <tk@giga.or.at>
54
55
56
57NiH                              July 29, 2005               ZIP_SOURCE_ZIP(3)
Impressum