zzip_read(3)
zzip_read(3) π
okay bestie, welcome to the zziplib Function List β¨ this one's about reading data, and honestly? it's giving "small function, big feelings" π
β¨ NAME β¨
zzip_read,zzip_freadβ read data. that's it, that's the whole vibe π
πΈ SYNOPSIS πΈ
#include <zzip/lib.h>
zzip_ssize_t
zzip_read(ZZIP_FILE* fp, void* buf, zzip_size_t len)
zzip_size_t
zzip_fread(void* ptr, zzip_size_t size, zzip_size_t nmemb, ZZIP_FILE* file)
no cap, those signatures are literal, copy them exactly bestie π«Ά
π¦ DESCRIPTION π¦
so zzip_read is literally just doing a read(2) on a real or zipped file. iconic behaviour honestly.
zzip_read is the replacement for read(2) and it will fill the buffer you gave it with bytes from the opened file. it returns the number of bytes read, so when you hit EOF you'll get prompted with the number of bytes actually read β not the number you asked for, the number you got. the way that matters πβ¨
and here's the tea π: if the file-handle is wrapping a stat'able file, then it will literally just perform a normal read(2)-call. otherwise zzip_file_read gets called to decompress the data stream, and any error gets mapped to errno(3). main character error handling fr fr π
π AUTHOR π
Guido Draheim <guidod@gmx.de> and Tomi Ollila <Tomi.Ollila@iki.fi> β the icons who made this happen, we stan πβ
π COPYRIGHT π
Copyright (c) Guido Draheim, use under copyleft (LGPL,MPL) β so go forth and share responsibly bestie π§
π SEE ALSO π
(ngl this page doesn't list any, but the ones named up top β read(2) and errno(3) β are the ones doing the heavy lifting, iykyk π)
heads up: the<zzip/lib.h>include and the exact type names (zzip_ssize_t,zzip_size_t,ZZIP_FILE) are load-bearing. don't freestyle those, fr fr π
anyway that's the whole page! this was the zziplib manual, version 0.13.78 β catch you in the next one, bye bestie ππ π¦πΈβ¨
π¦ where this page comes from
- centos-stream 10: zziplib-devel 0.13.78-2.el10 Β· LGPL-2.0-or-later OR MPL-1.1
- debian trixie: libzzip-dev 0.13.78+dfsg.1-0.1 Β· ZZIP
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 43: zziplib-devel 0.13.78-2.fc43 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- fedora 44: zziplib-devel 0.13.78-4.fc44 Β· LGPL-2.0-or-later OR MPL-1.1
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: zziplib-devel 0.13.78-160000.2.2 Β· LGPL-2.1-or-later
- ubuntu questing: libzzip-dev 0.13.78+dfsg.1-0.1
- ubuntu resolute: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- ubuntu stonking: libzzip-dev 0.13.78+dfsg.1-0.2 Β· ZZIP
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms