zzip_seek(3)
β¨ zzip_seek β the seek page π
okay so bestie, this is the man page for zzip_seek and zzip_seek32, straight out of the zziplib Function List. it's giving "let me move around inside your file" energy. sit down, hydrate, we're doing this π«Ά
πΈ NAME πΈ
zzip_seek, zzip_seek32 β seek. yeah. that's the whole vibe. it seeks. iconic honestly π
β¨ SYNOPSIS β¨
pull the header in first, always:
#include <zzip/lib.h>
and then the two besties themselves:
zzip_off_t
zzip_seek(ZZIP_FILE* fp, zzip_off_t offset, int whence)
long
zzip_seek32(ZZIP_FILE* fp, long offset, int whence)
copy those exactly, no cap π
π¦ DESCRIPTION π¦
so zzip_seek is gonna do a lseek(2) operation on a real/zipped file. that's the whole job description. she seeks π§
she'll try to seek to the offset you passed in as offset, relative to whence, and whence has to be one of SEEK_SET, SEEK_CUR or SEEK_END. no improvising, those are the options π
now here's where it gets interesting (derogatory). if the file-handle is wrapping a stat'able file, she just does a normal lseek(2) call and it's a whole slay, fast, no drama. but β and this is the part we need to talk about β if it's not, then the relative offset gets calculated, negative offsets get transformed into positive ones by rewinding the file, and then data is read until the offset is reached. yeah. she's reading. the whole way. π
this can make the function terribly slow. like, genuinely. that's just how gzio implements it, and the author is out here saying they're not sure there's a better way without using the internals of the algorithm. so. it's giving "it is what it is" π
and zzip_seek32? that one is provided for users who can not use any largefile-mode. she's here for you specifically π«Ά
π AUTHOR π
Guido Draheim <guidod@gmx.de> and Tomi Ollila <Tomi.Ollila@iki.fi> β the two main characters of this page, honestly β
π COPYRIGHT π
Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL). keep the receipts, bestie π
aaaand that's the whole page π this was zziplib version 0.13.78, page zzip_seek(3) β thanks for coming to my ted talk, go forth and seek responsibly, mwah πβ¨
π¦ where this page comes from
- centos-stream 10: zziplib-devel 0.13.78-2.el10 Β· LGPL-2.0-or-later OR MPL-1.1
- debian trixie: libzzip-dev 0.13.78+dfsg.1-0.1 Β· ZZIP
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu questing: libzzip-dev 0.13.78+dfsg.1-0.1
- ubuntu resolute: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- ubuntu stonking: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms