1ZIP_FREAD(3)             BSD Library Functions Manual             ZIP_FREAD(3)
2

NAME

4     zip_fread — read from file
5

LIBRARY

7     libzip (-lzip)
8

SYNOPSIS

10     #include <zip.h>
11
12     zip_int64_t
13     zip_fread(zip_file_t *file, void *buf, zip_uint64_t nbytes);
14

DESCRIPTION

16     The zip_fread() function reads up to nbytes bytes from file into buf.
17

RETURN VALUES

19     If successful, the number of bytes actually read is returned.  When
20     zip_fread() is called after reaching the end of the file, 0 is returned.
21     In case of error, -1 is returned.
22

SEE ALSO

24     libzip(3), zip_fclose(3), zip_fopen(3), zip_fseek(3)
25

HISTORY

27     zip_fread() was added in libzip 0.6.  In libzip 0.10 the return type was
28     changed from ssize_t to zip_int64_t.  In libzip 0.10 the type of nbytes
29     was changed from size_t to zip_uint64_t.
30

AUTHORS

32     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
33
34BSD                           September 28, 2021                           BSD
Impressum