ZIP_SOURCE(5)

πŸ’– ZIP_SOURCE(5) πŸ’–

okay bestie, welcome to the file formats manual ✨ this is zip_source(5), and it's literally the glow-up your data needs before it goes into a zip archive πŸŽ€

πŸ“š LIBRARY

libzip (-lzip) β€” that's the one, that's the girlies πŸ’…

✨ SYNOPSIS ✨

#include <zip.h>

zip_source_t *source;

πŸ¦‹ DESCRIPTION πŸ¦‹

So. A zip_source_t is a data source β€” or a destination, when you're using it for writing. no cap. libzip(3) uses it to add or replace the contents of a file inside a zip archive. And if your source supports seeking? bestie it can also be used to open zip archives from. it's giving multitasking πŸ‘‘


Where can the data come from, you ask? obsessed that you asked πŸ’œ

and if you only want part of that data? zip_source_window(3) or zip_source_window_create(3) can restrict access to a chunk of the contained data. slice it, bestie βœ‚οΈ


It can also act as a filter, processing the data handed over by an underlying zip_source_t β€” like, say, to compress it or compute a checksum. those get created with zip_source_layered(3) or zip_source_layered_create(3). layering? iconic. 🌈

Sources get freed with zip_source_free(3). periodt.


🫢 Sources must support reading, and can optionally support seeking and writing.

zip_source_t is reference counted, and it's created with a reference count of 1. now listen closely because this part matters fr fr:


πŸ‘€ SEE ALSO

libzip(3), zip_source_buffer(3), zip_source_file(3), zip_source_filep(3), zip_source_free(3), zip_source_function(3), zip_source_keep(3), zip_source_window(3), zip_source_zip(3)

πŸ‘‘ AUTHORS

Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β€” the icons who wrote this 🫢


and that's the whole page, bestie!! this one came from the Debian build, dated May 5, 2025 πŸ’– go forth and source your zips responsibly, mwah πŸŽ€βœ¨πŸ¦‹

πŸ“¦ where this page comes from