ZIP_SOURCE_TELL(3)

πŸ“¦
version 1.11.4 Β· 4 versions
, in arch rolling, fedora 43, fedora 44, nixpkgs unstable, ubuntu resolute, ubuntu stonking

πŸ’– ZIP_SOURCE_TELL β€” bestie, where even ARE we?? πŸ’–

okay so this is a page from the Library Functions Manual, and today we're talking about zip_source_tell from libzip. it's giving "GPS for your zip source" and honestly? obsessed. 🧭✨


πŸ“š LIBRARY

libzip β€” you link it with -lzip and then you're in your ✨zip era✨.


🌸 SYNOPSIS

#include <zip.h>

zip_int64_t
zip_source_tell(zip_source_t *source);

✨ DESCRIPTION ✨

so like, zip_source_tell() returns the current read offset for source. that's it. that's the whole vibe. πŸ“

and the iconic part? the return value can be handed straight to zip_source_seek(3) with whence set to SEEK_SET, and boom β€” you're right back at the same location in the source. bookmarking but for file offsets, no cap. πŸ”–πŸ’…


🫢 RETURN VALUES 🫢

  • slay: on successful completion, the current read offset is returned. periodt.
  • not slay: otherwise, -1 is returned, and the error information in source is set to indicate the error. (yes bestie, the error lives in source itself, go check it πŸ’€)

πŸ‘€ SEE ALSO πŸ‘€

iykyk β€” go read those too, they're all part of the family πŸ¦‹


πŸ“œ HISTORY πŸ“œ

zip_source_tell() was added in libzip 1.0. so it's been iconic since day one, fr fr. πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

the masterminds behind this whole situation: Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>. absolute legends, we stan. πŸŽ€


and that's the page bestie!! this one came from the Debian build, dated December 18, 2017, and the manual page itself is ZIP_SOURCE_TELL(3). take care of her, she's precious πŸ’–βœ¨πŸŒΈπŸ¦‹πŸ’…

πŸ“¦ where this page comes from