zzip_entry_data_offset(3)

NAME
zzip_entry_data_offset, zzip_entry_fread_file_header, zzip_entry_strdup_name - helper functions for (fseeko) zip access api

SYNOPSIS

#include <zzip/fseeko.h>

b'zzip_off_t\fInzzip_entry_data_offset(ZZIP_ENTRY * entry)
b'static zzip_off_t\fInzzip_entry_fread_file_header(ZZIP_ENTRY * entry,                            struct zzip_file_header *file_header)
b'zzip__new__ char *\fInzzip_entry_strdup_name(ZZIP_ENTRY * entry)n'

DESCRIPTION
b'The zzip_entry_data_offset functions returns the seekval offset of the data portion of thefile referenced by the given zzip_entry. It requires an intermediatecheck of the file_header structure (i.e. it reads it from disk). Afterthis call, the contained diskfile readposition is already set to thedata_offset returned here.

b'The zzip_entry_data_offset functionReturns -1 on error. (errno = EINVAL|EBADMSG)n'

b' The zzip_entry_fread_file_header functions read the correspoding struct zzip_file_header fromthe zip disk of the given "entry". The returned off_t points to theend of the file_header where the current fseek pointer has stopped.This is used to immediately parse out any filename/extras block followingthe file_header.

b'The zzip_entry_fread_file_header functionReturns zero on error. (errno = EINVAL|EBADMSG|EBADF|EIO)n'

b' The zzip_entry_strdup_name function is a big helper despite its little name: in a zip file theencoded filenames are usually NOT zero-terminated but for common usagewith libc we need it that way. Secondly, the filename SHOULD be presentin the zip central directory but if not then we fallback to the filenamegiven in the file_header of each compressed data portion.

b'returns: new string buffer, null on error (errno = EINVAL|ENOMEM|EBADMSG)n

AUTHOR
b'Guido Draheim <guidod@gmx.de>

COPYRIGHT
b'Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)n'