ZIP_REGISTER_PROGRESS_CALLBACK(3)
π ZIP_REGISTER_PROGRESS_CALLBACK π
okay bestie, welcome to the Library Functions Manual section of the libzip lore πΈ this one's a lil vintage, a lil deprecated, but still iconic in its own way. let's get into it β¨
β¨ NAME β¨
zip_register_progress_callback β provide updates during zip_close (obsolete interface) π«Ά
π LIBRARY π
libzip (-lzip) β yeah she lives in libzip, link her in and you're good π
π SYNOPSIS π
#include <zip.h>
typedef void (*zip_progress_callback_t)(double);
void
zip_register_progress_callback(zip_t *archive,
zip_progress_callback_t progress_callback);
no cap, that's the whole signature. copy it exactly, bestie, character for character π
π¦ DESCRIPTION π¦
so zip_register_progress_callback() is the obsolete version of zip_register_progress_callback_with_state(3). she's the older sister, still valid, but the newer one is the main character now π
what she does: she registers a callback function, progress_callback, for the zip archive archive. that callback gets called during zip_close(3) β and the timing is so specific, she calls it after every single zip archive entry that's completely written to disk. like, each one. every one. no skipping β¨
the value she hands your callback is a double in the range from 0.0 to 1.0. zero at the start, one at the end, and everything in between is vibes π
and why would you even want this? literally to provide progress indicators for user interfaces. progress bars, spinners, little percentage counters, the whole aesthetic π if your app makes people wait while zipping, this is how you keep them from spiralling π
heads up bestie: this interface is obsolete. not gone, not broken, just old. see HISTORY below for the tea β
π SEE ALSO π
π HISTORY π
zip_register_progress_callback() was added in libzip 1.2.0 π±
then it was deprecated in libzip 1.3.0 β use zip_register_progress_callback_with_state() instead, fr fr π
π AUTHORS π
- Dieter Baron
<dillo@nih.at> - Thomas Klausner
<wiz@gatalith.at>
two absolute legends, we stan π
and that's the whole page, bestie!! this one came from the fine folks over at Debian, dated December 18, and she's part of the libzip 1.2.0-and-later era (deprecated as of 1.3.0). go forth, register your progress callbacks, and slay π
β¨π¦
π¦ 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-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