ZIP_SOURCE_BEGIN_WRITE(3)
π ZIP_SOURCE_BEGIN_WRITE π
okay bestie, so this is a manual page from the Library Functions Manual β it's the one about zip_source_begin_write and its little sister zip_source_begin_write_cloning, both living in that iconic ZIP_SOURCE_BEGIN_WRITE(3) energy. periodt. π
β¨ NAME β¨
zip_source_begin_write, zip_source_begin_write_cloning β get a zip source ready for writing π
π LIBRARY π
libzip (-lzip) β yeah, that's the one, link against it bestie π«Ά
πΈ SYNOPSIS πΈ
#include <zip.h>
int
zip_source_begin_write(zip_source_t *source);
int
zip_source_begin_write_cloning(zip_source_t *source,
zip_uint64_t offset);
π¦ DESCRIPTION π¦
okay so, both of these functions β zip_source_begin_write() and zip_source_begin_write_cloning() β do one big thing: they prepare source for writing. it's giving "getting your room ready before the party" energy. usually that means making temp files or allocating buffers. like, the actual setup work. no cap. β¨
now zip_source_begin_write_cloning() is the extra one: it preserves the first offset bytes of the original file. the way that it does this efficiently? iconic. and here's the important part bestie β writes to source won't overwrite the original data until zip_commit_write() is called. so you're safe until you commit. π₯
π RETURN VALUES π
- on a successful completion,
0is returned π - otherwise,
-1is returned, and the error information in source gets set to tell you what went wrong π
π§ SEE ALSO π§
libzip(3)zip_source(5)zip_source_commit_write(3)zip_source_rollback_write(3)zip_source_seek_write(3)zip_source_tell_write(3)zip_source_write(3)
β HISTORY β
zip_source_begin_write()was added in libzip 1.0. og behaviour. πzip_source_begin_write_cloning()was added in libzip 1.4.0. the sequel nobody expected but everybody needed. π¦
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the actual main characters who wrote this. we stan. π
aaaand that's the whole thing bestie!! this page came to you from the Debian fam, version vibes dated December 18, 2017, filed under ZIP_SOURCE_BEGIN_WRITE(3) πβ¨ go forth and write your zip sources responsibly, ily, bye!! ππ«Ά
π¦ 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