ZIP_FSEEK(3)
π ZIP_FSEEK(3) π
ok so bestie, this is the manual page for zip_fseek and zip_file_is_seekable β aka the "seek in file" girlies π
it lives in the Library Functions Manual, and no cap, it's shorter than your attention span but every line matters.
β¨ LIBRARY β¨
libzip (-lzip) π that's the one. link it and you're in.
πΈ SYNOPSIS πΈ
#include <zip.h>
zip_int8_t
zip_fseek(zip_file_t *file, zip_int64_t offset, int whence);
int
zip_file_is_seekable(zip_file_t *file);
likeβ¦ that's it. two functions. iconic behavior honestly π¦
π DESCRIPTION π
okay so the zip_fseek() function seeks to the specified offset relative to whence, just like fseek(3) does. same energy, different zip context β¨
but β and this is the part where you need to listen, bestie β zip_fseek only works on uncompressed (stored), unencrypted data. the way that compressed or encrypted data just says no π when you call it on compressed or encrypted data it will return an error. not a vibe. it's giving "read the room."
the zip_file_is_seekable() function returns 1 if a file is seekable. that's the whole job. queen of knowing whether you can even do the thing π
π₯ RETURN VALUES π₯
- if successful,
zip_fseek()returns0β - otherwise,
-1is returned π
for zip_file_is_seekable():
- it returns
1if a file is seekable and0if not π - on an invalid argument, it returns
-1π
so like,0fromzip_fseek= slay,-1= not slay. and forzip_file_is_seekable,1= seekable,0= nope,-1= you handed it something invalid fr fr.
π SEE ALSO π
go read these too, bestie, they're all part of the same friend group π«Ά
β HISTORY β
zip_fseek()was added in libzip1.2.0πzip_file_is_seekable()was added in libzip1.9.0πΈ
growth! evolution! we love to see it β¨
π AUTHORS π
- Dieter Baron
<dillo@nih.at> - Thomas Klausner
<wiz@gatalith.at>
absolute legends, no notes π
and that's the page, bestie π¦ this came to you from Debian, dated September 11, 2024, for ZIP_FSEEK(3) β mwah, go forth and seek responsibly, ily πβ¨
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- debian trixie: libzip-dev 1.11.3-2 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 43: libzip-devel 1.11.4-2.fc43 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- fedora 44: libzip-devel 1.11.4-3.fc44 Β· BSD-3-Clause
- nixpkgs unstable: libzip 1.11.4
- ubuntu questing: libzip-dev 1.11.3-2
- ubuntu resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2016-2022 Dieter Baron and Thomas Klausner
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms