11#include <OpenMS/config.h>
78 size_t read(
char* s,
size_t n);
85 bool streamEnd()
const;
117 void open(
const char* filename);
128 void* zip_archive_ =
nullptr;
129 void* zip_entry_ =
nullptr;
130 bool stream_at_end_ =
true;
Streaming reader for the single non-directory entry of a ZIP archive.
Definition ZipIfstream.h:37
bool isOpen() const
Whether an archive entry is currently open for reading.
Definition ZipIfstream.h:133
ZipIfstream(const char *filename)
Construct and open filename in one step; see open for the exact behaviour and exception set.
void * zip_entry_
Opaque libzip zip_file_t* handle for the currently streamed entry; nullptr when no entry is open.
Definition ZipIfstream.h:129
virtual ~ZipIfstream()
Destructor; closes the archive and the entry handle.
ZipIfstream & operator=(const ZipIfstream &)=delete
void open(const char *filename)
Open filename and select its single non-directory entry for reading.
void close()
Close the currently open archive (no-op if none is open). After the call, isOpen returns false and st...
bool stream_at_end_
true once the stream has been closed (either explicitly via close or implicitly because the entry was...
Definition ZipIfstream.h:130
size_t read(char *s, size_t n)
Read up to n decompressed bytes from the open entry into s.
ZipIfstream(ZipIfstream &&)=delete
ZipIfstream()
Default constructor; leaves the instance in a closed state (isOpen returns false, streamEnd returns t...
ZipIfstream(const ZipIfstream &)=delete
bool streamEnd() const
Whether the stream has been closed (end of entry reached or no archive opened).
Definition ZipIfstream.h:138
ZipIfstream & operator=(ZipIfstream &&)=delete
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19