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_seek(3) zziplib Function List zzip_seek(3)

zzip_seek, zzip_seek32 - seek.

#include <zzip/lib.h>



zzip_off_t
zzip_seek(ZZIP_FILE * fp, zzip_off_t offset, int whence)
long
zzip_seek32(ZZIP_FILE * fp, long offset, int whence)

The zzip_seek function will perform a lseek(2) operation on a real/zipped file

It will try to seek to the offset specified by offset, relative to whence, which is one of SEEK_SET, SEEK_CUR or SEEK_END.

If the file-handle is wrapping a stat'able file then it will actually just perform a normal lseek(2)-call. Otherwise the relative offset is calculated, negative offsets are transformed into positive ones by rewinding the file, and then data is read until the offset is reached. This can make the function terribly slow, but this is how gzio implements it, so I'm not sure there is a better way without using the internals of the algorithm.

The zzip_seek32 function is provided for users who can not use any largefile-mode.

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

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

0.13.72 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.