'\" t .\" Title: zzip_entry_data_offset .\" Author: [see the "Author" section] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 0.13.62 .\" Manual: zziplib Function List .\" Source: zziplib .\" Language: English .\" .TH "ZZIP_ENTRY_DATA_OFFS" "3" "0\&.13\&.62" "zziplib" "zziplib Function List" .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" zzip_entry_data_offset, zzip_entry_fread_file_header, zzip_entry_strdup_name \- helper functions for (fseeko) zip access api .SH "SYNOPSIS" .sp .ft B .nf #include .fi .ft .HP \w'zzip_off_t\ zzip_entry_data_offset('u .BI "zzip_off_t zzip_entry_data_offset((ZZIP_ENTRY\ *\ entry));" .HP \w'static\ zzip_off_t\ zzip_entry_fread_file_header('u .BI "static zzip_off_t zzip_entry_fread_file_header((ZZIP_ENTRY\ *\ entry,\ struct\ zzip_file_header\ *file_header));" .HP \w'zzip__new__\ char\ *\ zzip_entry_strdup_name('u .BI "zzip__new__ char * zzip_entry_strdup_name((ZZIP_ENTRY\ *\ entry));" .SH "DESCRIPTION" .PP The \fBzzip_entry_data_offset\fR functions returns the seekval offset of the data portion of the file referenced by the given zzip_entry\&. It requires an intermediate check of the file_header structure (i\&.e\&. it reads it from disk)\&. After this call, the contained diskfile readposition is already set to the data_offset returned here\&. On error \-1 is returned\&. .PP The \fBzzip_entry_fread_file_header\fR functions read the correspoding struct zzip_file_header from the zip disk of the given "entry"\&. The returned off_t points to the end of the file_header where the current fseek pointer has stopped\&. This is used to immediatly parse out any filename/extras block following the file_header\&. The return value is null on error\&. .PP The \fBzzip_entry_strdup_name\fR function is a big helper despite its little name: in a zip file the encoded filenames are usually NOT zero\-terminated but for common usage with libc we need it that way\&. Secondly, the filename SHOULD be present in the zip central directory but if not then we fallback to the filename given in the file_header of each compressed data portion\&. .SH "AUTHOR" .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Guido Draheim .RE .SH "COPYRIGHT" .PP Copyright (c) 2003,2004 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