ZIP_SOURCE_READ(3)
β¨ zip_source_read(3) β¨
ok so bestie, welcome to the <pink>zip_source_read</pink> page β that's the manual page for <pink>zip_source_read</pink> from the <lavender>Library Functions Manual</lavender>, living in <mint>libzip</mint>. grab a snack, we're reading bytes π
πΈ NAME πΈ
zip_source_read β read data from a zip source π¦
π LIBRARY π
libzip (-lzip) β link it and you're golden β¨
π SYNOPSIS π
#include <zip.h>
zip_int64_t
zip_source_read(zip_source_t *source, void *data, zip_uint64_t len);
π DESCRIPTION π
ok so <pink>zip_source_read()</pink> is literally the "gimme the bytes" function. it reads up to len bytes of data from source, at the current read offset, straight into the buffer data. that's it, that's the whole vibe π«Ά
β οΈ but listen β the zip sourcesourcehas to be opened for reading first, by callingzip_source_open(3). no open, no read. periodt π
π RETURN VALUES π
- β if it goes well, you get the number of bytes read back. slay.
- π if you call
<pink>zip_source_read()</pink>after you've already hit the end of the file, you get0. that's the "nothing left bestie" signal. - π otherwise you get
-1, and the error information insidesourcegets set to tell you what went wrong. not the vibe, but at least it tells you.
π SEE ALSO π
libzip(3), zip_source(5), zip_source_seek(3), zip_source_tell(3), zip_source_write(3)
go read those too, they're iconic π₯
π¦ HISTORY π¦
zip_source_read() was added in libzip 1.0. a legend from the start, no cap π
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>
and that's the page!! this one shipped with the <purple>Debian</purple> build, dated <purple>September 28, 2021</purple>, and it's the <pink>ZIP_SOURCE_READ(3)</pink> page itself π tysm for reading, go open your source before you read from it, mwah πβ¨
π¦ 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-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