zzip_read

Langue: en

Version: 0\&.13\&.49 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

zzip_read, zzip_fread -

SYNOPSIS

 #include <zzip/lib.h>
 
zzip_ssize_t zzip_read((ZZIP_FILE * fp, void * buf, zzip_size_t len));
zzip_size_t zzip_fread((void *ptr, zzip_size_t size, zzip_size_t nmemb, ZZIP_FILE *file));

DESCRIPTION

The zzip_read function will read(2) data from a real/zipped file.

the replacement for read(2) will fill the given buffer with bytes from the opened file. It will return the number of bytes read, so if the EOF is encountered you will be prompted with the number of bytes actually read.

If the file-handle is wrapping a stat'able file then it will actually just perform a normal read(2)-call, otherwise zzip_file_read is called to decompress the data stream and any error is mapped to errno(3).

AUTHOR

* Guido Draheim <guidod@gmx.de> Tomi Ollila <Tomi.Ollila@iki.fi>

Copyright (c) 1999,2000,2001,2002,2003 Guido Draheim All rights reserved, use under the restrictions of the Lesser GNU General Public License or alternatively the restrictions of the Mozilla Public License 1.1