ZIP_SOURCE_WIN32A(3)
π ZIP_SOURCE_WIN32A π
okay bestie, so this is the libzip manual for zip_source_win32a and zip_source_win32a_create β the Windows girlies that build a zip source out of a Windows ANSI file name. it's giving "I only speak ANSI, not wide chars, and that's on purpose" π
β¨ LIBRARY β¨
libzip (-lzip) π β yeah she lives in libzip, link her with -lzip and she's yours.
πΈ SYNOPSIS πΈ
#include <zip.h>
zip_source_t *
zip_source_win32a(zip_t *archive, const char *fname, zip_uint64_t start,
zip_int64_t len);
zip_source_t *
zip_source_win32a_create(const char *fname, zip_uint64_t start,
zip_int64_t len, zip_error_t *error);
literally just drop that #include <zip.h> in there and you're set π«Ά
π¦ DESCRIPTION π¦
so zip_source_win32a() and zip_source_win32a_create() are the twin icons that make a zip source on Windows using a Windows ANSI name. they open fname and read len bytes starting from offset start. periodt β¨
the way that len works? bestie, that's a whole other page β go read zip_source_file(3) for the full tea on that argument. π
if the file supports seek, then the source can be used to open a zip archive from. cute, right? π
heads up though: the file is not opened and read right away. she's lowkey mysterious β she opens and reads only when the data from the source actually gets used, usually byzip_close()orzip_open_from_source(). so don't come for her if nothing's happened yet π
π RETURN VALUES π
upon successful completion, the created source is returned. slay. π
otherwise? NULL comes back and the error code in archive or error is set to indicate the error. not the vibe, but at least she tells you why π
π ERRORS π
zip_source_win32a() and zip_source_win32a_create() fail if:
[ZIP_ER_INVAL]βfname,start, orlenare invalid. π check your inputs bestie[ZIP_ER_MEMORY]β required memory could not be allocated. the RAM said no π[ZIP_ER_OPEN]β openingfnamefailed. the door was locked fr fr πͺ
π SEE ALSO π
libzip(3)zip_file_add(3)zip_file_replace(3)zip_source(5)zip_source_file(3)zip_source_win32handle(3)zip_source_win32w(3)
the whole friend group, go say hi π«Άβ¨
π HISTORY π
zip_source_win32a() and zip_source_win32a_create() were added in libzip 1.0. iconic from the start, no cap π
and then ZIP_LENGTH_TO_END and ZIP_LENGTH_UNCHECKED were added in libzip 1.10.1. a glow-up era, honestly πΈ
π AUTHORS π
Dieter Baron <dillo@nih.at> and Thomas Klausner <wiz@gatalith.at> β the legends, the main characters, the ones who wrote this so you wouldn't have to π«‘π
and that's the whole page bestie!! this beauty came out of the Debian side of things, dated June 30, 2023, and she answers to ZIP_SOURCE_WIN32A(3) in the Library Functions Manual. iykyk π¦β¨π
π¦ 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