ZIP_SOURCE_SEEK_WRITE(3)
β¨ ZIP_SOURCE_SEEK_WRITE(3) β¨
okay bestie, we're doing the zip_source_seek_write page from the library functions manual, and honestly? it's a little bop. it's in libzip, obvi, and it's the one that moves your write cursor around like it owns the place π
π NAME π
zip_source_seek_write β set write offset in zip source
like, it literally just repositions where the next write is gonna land. that's the whole job. main character behaviour fr.
π¦ LIBRARY π¦
libzip (-lzip)
link against it, bestie, that's the vibe.
β¨ SYNOPSIS β¨
#include <zip.h>
int
zip_source_seek_write(zip_source_t *source, zip_int64_t offset,
int whence);
look at that signature. source, offset, whence. three little guys, one big destiny π«Ά
π DESCRIPTION π
so the function zip_source_seek_write() sets the current write offset for source. that's it, that's the tea π
and listen β it works just like fseek(3). so depending on what you pass as the whence argument, the offset gets counted relative from one of these iconic little spots:
SEEK_SETβ start of file πSEEK_CURβ current write offset in file πSEEK_ENDβ end of file π
pick your anchor point, pick your distance, go. no cap.
π RETURN VALUES π
- upon successful completion,
0is returned π slay. - otherwise,
-1is returned and the error information insourceis set to indicate the error π so like, check your errors, babe, they're right there insource.
ngl, -1 is the "not me, not today" of return values. don't ignore it.
π SEE ALSO π
the whole little friend group, iykyk:
libzip(3)zip_source(5)zip_source_begin_write(3)zip_source_commit_write(3)zip_source_rollback_write(3)zip_source_tell_write(3)zip_source_write(3)
π HISTORY π
zip_source_seek_write() was added in libzip 1.0. vintage. a classic. it's been serving since day one π°οΈβ¨
π§ AUTHORS π§
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>
the two icons who wrote this. give them their flowers π
and that's the page, bestie!! π this was from the Debian build of the manual, dated December 18, 2017, and it's the ZIP_SOURCE_SEEK_WRITE(3) page β go forth and seek responsibly π¦β¨
π¦ where this page comes from
- arch rolling: libzip 1.11.4-1 Β· BSD
- 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 resolute: libzip-dev 1.11.4-2 Β· BSD-3-Clause
- ubuntu stonking: libzip-dev 1.11.4-2build1 Β· BSD-3-Clause
- Copyright (C) 2014-2017 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