![]() |
![]()
| ![]() |
![]()
NAMEzzip_entry_fopen, zzip_entry_ffile, zzip_entry_fread, zzip_entry_fclose, zzip_entry_feof - open a file within a zip disk for reading SYNOPSIS#include <zzip/fseeko.h> zzip__new__ ZZIP_ENTRY_FILE* zzip_entry_fopen(ZZIP_ENTRY* entry, int takeover) zzip__new__ ZZIP_ENTRY_FILE* zzip_entry_ffile(FILE* disk, char* filename) zzip_size_t zzip_entry_fread(void* ptr, zzip_size_t sized, zzip_size_t nmemb, ZZIP_ENTRY_FILE* file) int zzip_entry_fclose(ZZIP_ENTRY_FILE* file) int zzip_entry_feof(ZZIP_ENTRY_FILE* file) DESCRIPTIONThe zzip_entry_fopen function does take an "entry" argument and copies it (or just takes it over as owner) to a new ZZIP_ENTRY_FILE handle structure. That structure contains also a zlib buffer for decoding. The zzip_entry_fopen function does seek to the file_header of the given "entry" and validates it for the data buffer following it. We do also prefetch some data from the data buffer thereby trying to match the disk pagesize for faster access later. The zzip_entry_fread will then read in chunks of pagesizes which is the size of the internal readahead buffer. If an error occurs then null is returned.
AUTHORGuido Draheim <guidod@gmx.de> COPYRIGHTCopyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
|