1ZIP_SOURCE_WINDOW_CRE... BSD Library Functions Manual ZIP_SOURCE_WINDOW_CRE...
2

NAME

4     zip_source_window_create — create zip data source overlay
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     zip_source_t *
13     zip_source_window_create(zip_source_t *source, zip_uint64_t start,
14         zip_int64_t len, zip_error_t *error);
15

DESCRIPTION

17     The zip_source_window_create() function create a zip source from an un‐
18     derlying zip source, restricting access to a particular window starting
19     at byte start and having size len.  If len is -1, the window spans to the
20     end of the underlying source.
21
22     zip_source_window() and zip_source_window_create() don't take ownership
23     of source.  The caller is responsible for freeing it.  (This is different
24     to other layered sources.)
25

RETURN VALUES

27     Upon successful completion, the created source is returned.  Otherwise,
28     NULL is returned and the error code in error is set to indicate the er‐
29     ror.
30

ERRORS

32     zip_source_window_create() fails if:
33
34     [ZIP_ER_INVAL]     src is NULL; there is an integer overflow adding start
35                        and len; or len is less than -1.
36
37     [ZIP_ER_MEMORY]    Required memory could not be allocated.
38

SEE ALSO

40     libzip(3), zip_source(3) zip_source(3)
41

HISTORY

43     zip_source_window_create() was added in libzip 1.8.0.
44

AUTHORS

46     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
47
48BSD                             April 29, 2021                             BSD
Impressum