GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
zzip_entry_data_offset(3) zziplib Function List zzip_entry_data_offset(3)

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

#include <zzip/fseeko.h>

zzip_off_t zzip_entry_data_offset(ZZIP_ENTRY * entry)
static zzip_off_t zzip_entry_fread_file_header(ZZIP_ENTRY * entry, struct zzip_file_header *file_header)
zzip__new__ char * zzip_entry_strdup_name(ZZIP_ENTRY * entry)


The zzip_entry_data_offset 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.
The zzip_entry_data_offset function Returns -1 on error. (errno = EINVAL|EBADMSG)

The zzip_entry_fread_file_header 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 immediately parse out any filename/extras block following the file_header.
The zzip_entry_fread_file_header function Returns zero on error. (errno = EINVAL|EBADMSG|EBADF|EIO)

The zzip_entry_strdup_name 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.

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


Guido Draheim <guidod@gmx.de>


Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL)
0.13.69 zziplib

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.