11#include <OpenMS/config.h>
82 size_t read(
char * s,
size_t n);
89 bool streamEnd()
const;
108 void open(
const char * filename);
135 return file_ !=
nullptr;
Streaming decompressor for bzip2 (.bz2) files.
Definition Bzip2Ifstream.h:40
bool isOpen() const
Whether a file is currently open for reading.
Definition Bzip2Ifstream.h:133
Bzip2Ifstream(const char *filename)
Construct and open filename for reading in one step.
Bzip2Ifstream(const Bzip2Ifstream &bzip2)
int bzerror_
Most recent bzip2 status code returned to the read API.
Definition Bzip2Ifstream.h:123
std::FILE * file_
Underlying std::FILE handle used to feed the bzip2 reader; nullptr when no file is open.
Definition Bzip2Ifstream.h:115
Bzip2Ifstream()
Default constructor; leaves the instance in a closed state (isOpen returns false, streamEnd returns t...
void open(const char *filename)
Open filename for reading; closes the currently open file first.
void close()
Close the currently open file (no-op if none is open). After the call, isOpen returns false and strea...
bool stream_at_end_
true once the stream has been closed (either explicitly via close or implicitly because the end of th...
Definition Bzip2Ifstream.h:125
size_t read(char *s, size_t n)
Read up to n decompressed bytes into s.
virtual ~Bzip2Ifstream()
Destructor; closes the bzip2 reader and the underlying file handle.
size_t n_buffer_
Number of bytes produced by the most recent read call.
Definition Bzip2Ifstream.h:121
Bzip2Ifstream & operator=(const Bzip2Ifstream &bzip2)
void * bzip2file_
Definition Bzip2Ifstream.h:119
bool streamEnd() const
Whether the stream has been closed (end of file reached or no file opened).
Definition Bzip2Ifstream.h:138
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19