ZIP_SOURCE_WIN32HANDLE(3)
ZIP_SOURCE_WIN32HANDLE(3) π
okay so bestie, this is a Library Functions Manual page for zip_source_win32handle β section 3 of the libzip man pages. Windows file handles + zip sources. it's giving niche but iconic. let's GO π¦
β¨ NAME β¨
zip_source_win32handle, zip_source_win32handle_create β create data source from a Windows file handle
π LIBRARY π
libzip (-lzip)
π SYNOPSIS π
#include <zip.h>
zip_source_t *
zip_source_win32handle(zip_t *archive, HANDLE h, zip_uint64_t start,
zip_int64_t len);
zip_source_t *
zip_source_win32handle_create(HANDLE h, zip_uint64_t start,
zip_int64_t len, zip_error_t *error);
πΈ DESCRIPTION πΈ
so like. the functions zip_source_win32handle() and zip_source_win32handle_create() do the thing where they create a zip source from a Windows file handle πͺβ¨
they read len bytes from offset start from it. and if len is 0 or -1, then the whole file (starting from start, obviously, we're not feral) is used. π
if the file supports seek, the source can be used to open a zip archive from. lowkey important. π
and here's the timing tea: the file is opened and read when the data from the source is used β usually by zip_close() or zip_open_from_source(). so not right this second, bestie. it's a later thing. π
π₯ RETURN VALUES π₯
upon successful completion, the created source is returned. yay!! π
otherwise, NULL is returned and the error code in archive or error is set to indicate the error. sad girl hours. π
π ERRORS π
zip_source_w32handle() and zip_source_w32handle_create() fail if:
[ZIP_ER_INVAL]βh,start, orlenare invalid. π[ZIP_ER_MEMORY]β Required memory could not be allocated. π
not me noticing the names here are spelledzip_source_w32handle()andzip_source_w32handle_create()β noin, no32handle... yeah that's literally what the page says, bestie. that's the error section's own spelling. i am simply relaying it, character for character, because that is the vibe and also the rule. π«Ά
π SEE ALSO π
libzip(3), zip_file_add(3), zip_file_replace(3), zip_source(5), zip_source_win32a(3), zip_source_win32w(3)
π HISTORY π
zip_source_win32handle() and zip_source_win32handle_create() were added in libzip 1.0. throwback!! π§
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at>
and that's the whole page, no cap. this one came from Debian, dated May 14, 2024, and it's the ZIP_SOURCE_WIN32HANDLE(3) page β mwah, slay, periodt. π
β¨π
π¦ 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) 2015-2021 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