zipios::ZipFile(3)
π zipios::ZipFile π
okay bestie, gather round, because this is a Library Functions Manual entry and it's genuinely a banger. We're talking zipios::ZipFile β the whole page, the whole vibe, no cap. π¦
β¨ NAME β¨
zipios::ZipFile β the icon itself π
πΈ SYNOPSIS πΈ
#include <zipfile.h>
Inherits zipios::FileCollection. Yes, it's a nepo baby, but like, a talented one. π
π Public Member Functions
ZipFile ()β Default constructor.ZipFile (const string &name, int s_off=0, int e_off=0)β Constructor.virtual FileCollection * clone () constβ Create a heap allocated clone of the object this method is called for.virtual ~ZipFile ()β Destructor.virtual void close ()β Closes theFileCollection.virtual istream * getInputStream (const ConstEntryPointer &entry)virtual istream * getInputStream (const string &entry_name, MatchPath matchpath=MATCH)β Returns a pointer to an openedistreamfor the specified entry name.
π§ Static Public Member Functions
static ZipFile openEmbeddedZipFile (const string &name)
π Additional Inherited Members
π Detailed Description
ZipFile is a FileCollection, where the files are stored in a .zip file. That's it, that's the whole personality, and honestly? It ate. π₯
Definition at line 20 of file zipfile.h.
π«Ά Constructor & Destructor Documentation π«Ά
zipios::ZipFile::ZipFile () [inline]
Default constructor. The little blank-slate moment, the main character before the character arc. β¨
Definition at line 37 of file zipfile.h.
zipios::ZipFile::ZipFile (const string & name, int s_off = 0, int e_off = 0) [explicit]
Constructor. Opens the zip file name. Now listen β if the zip 'file' is embedded in a file that contains other data, e.g. a binary program, then the offset of the zip file start and end must be specified. iykyk. π
Parameters
- name β The filename of the zip file to open.
- s_off β Offset relative to the start of the file, that indicates the beginning of the zip file.
- e_off β Offset relative to the end of the file, that indicates the end of the zip file. The offset is a positive number, even though the offset is towards the beginning of the file. (yes bestie it's giving slightly unhinged, but that's the deal π)
Exceptions
FColExceptionβ Thrown if the specified file name is not a valid zip archive.IOExceptionβ Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read.
Definition at line 30 of file zipfile.cpp.
zipios::ZipFile::~ZipFile () [virtual]
Destructor. Saying goodbye, closing the tab, logging off. π₯²
Definition at line 46 of file zipfile.cpp.
β Member Function Documentation β
FileCollection * zipios::ZipFile::clone () const [virtual]
Create a heap allocated clone of the object this method is called for. The caller is responsible for deallocating the clone when he is done with it. So like β you made the twin, you raise the twin. π«‘
Returns
A heap allocated copy of the object this method is called for.
Implements zipios::FileCollection.
Definition at line 41 of file zipfile.cpp.
void zipios::ZipFile::close () [virtual]
Closes the FileCollection.
Implements zipios::FileCollection.
Definition at line 50 of file zipfile.cpp.
istream * zipios::ZipFile::getInputStream (const ConstEntryPointer & entry) [virtual]
Returns a pointer to an opened istream for the specified FileEntry. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no such FileEntry in the FileCollection. So basically: it might hand you nothing, and that's a whole mood. π
Parameters
- entry β A
ConstEntryPointerto theFileEntryto get anistreamto.
Returns
an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it. (say it with me: you delete it. not the library. you. π
)
Exceptions
InvalidStateExceptionβ Thrown if the collection is invalid.
Implements zipios::FileCollection.
Definition at line 55 of file zipfile.cpp.
istream * zipios::ZipFile::getInputStream (const string & entry_name, MatchPath matchpath = MATCH) [virtual]
Returns a pointer to an opened istream for the specified entry name. It is the callers responsibility to delete the stream when he is done with it. Returns 0, if there is no entry with the specified name in the FileCollection. Same energy as before, just matched by name this time. β¨
Parameters
- matchpath β Speficy
MATCH, if the path should match as well, specifyIGNORE, if the path should be ignored. (yes the original says "Speficy", we're keeping it, it's iconic π)
Returns
an open istream for the specified entry. The istream is allocated on heap and it is the users responsibility to delete it when he is done with it.
Exceptions
InvalidStateExceptionβ Thrown if the collection is invalid.
Implements zipios::FileCollection.
Definition at line 61 of file zipfile.cpp.
ZipFile zipios::ZipFile::openEmbeddedZipFile (const string & name) [static]
Opens a Zip archive embedded in another file, by writing the zip archive to the end of the file followed by the start offset of the zip file. The offset must be written in zip-file byte-order (little endian). The program appendzip, which is part of the Zipios++ distribution can be used to append a Zip archive to a file, e.g. a binary program. Lowkey the coolest trick on this whole page ngl. πͺ
Exceptions
FColExceptionβ Thrown if the specified file name is not a valid zip archive.IOExceptionβ Thrown if an I/O problem is encountered, while the directory of the specified zip archive is being read.
Definition at line 19 of file zipfile.cpp.
π Author π
Generated automatically by Doxygen for Zipios++ from the source code. Not a human, not a vibe curator β just Doxygen doing its thing. π€
that's the whole page bestie, every flag, every offset, every exception, nothing skipped, periodt. π
Zipios++ Β· Tue Mar 24 2020 Β· zipios::ZipFile(3) β mwah, take care of her π«Άβ¨
π¦ where this page comes from
- ubuntu jammy: libzipios++-dev 0.1.5.9+cvs.2007.04.28-11build1 Β· LGPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms