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 from
17     the current position in the file (see zip_fseek(3)).  After reading, the
18     current position is updated by the number of bytes read.
19

RETURN VALUES

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

SEE ALSO

26     libzip(3), zip_fclose(3), zip_fopen(3), zip_fseek(3)
27

HISTORY

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

AUTHORS

34     Dieter Baron <dillo@nih.at> and Thomas Klausner <tk@giga.or.at>
35
36BSD                            November 3, 2022                            BSD
Impressum