ZIP_SOURCE_WRITE(3)
π zip_source_write(3) β bestie's guide to yeeting bytes into a zip source π
okay so this is zip_source_write(3), and it lives in libzip (-lzip) π it's giving "write data to zip source" energy and honestly? iconic.
β¨ SYNOPSIS β¨
#include <zip.h>
zip_int64_t
zip_source_write(zip_source_t *source, const void *data,
zip_uint64_t len);
πΈ DESCRIPTION πΈ
so like. zip_source_write() takes len bytes out of the buffer data and writes them into the zip source source, right at the current write offset. that's it. that's the whole vibe. π
β οΈ but bestie, LISTEN β yoursourcehas to be prepared for writing first. you have to callzip_source_begin_write(3)before you do literally anything else. nobegin_write, nowrite. that's the rule. π«Ά
π₯ RETURN VALUES π₯
if everything slays: you get back the number of bytes written β¨
if it does NOT slay: you get -1 back, and the error info inside source gets set to tell you what went wrong π (it's giving "read the error, bestie").
π SEE ALSO π
libzip(3)zip_source(5)zip_source_begin_write(3)zip_source_commit_write(3)zip_source_rollback_write(3)zip_source_seek_write(3)zip_source_tell_write(3)
like. the whole write-arc cinematic universe. go read them. π¦
π°οΈ HISTORY π°οΈ
zip_source_write() was added in libzip 1.0. a true original. main character since day one. π
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the two legends who made this happen π
okay pookie that's the whole page!! this version came from the Debian peeps, dated December 18, 2017, and the manpage is literally just called ZIP_SOURCE_WRITE(3). go forth and write those bytes, you absolute icon πβ¨π«Ά
π¦ 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