11#include <OpenMS/config.h>
75 size_t read(
char * s,
size_t n);
82 bool streamEnd()
const;
101 void open(
const char * filename);
126 return file_ !=
nullptr;
Streaming decompressor for bzip2 (.bz2) files.
Definition Bzip2Ifstream.h:33
bool isOpen() const
Whether a file is currently open for reading.
Definition Bzip2Ifstream.h:124
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:114
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:116
FILE * file_
Underlying FILE handle used to feed the bzip2 reader; nullptr when no file is open.
Definition Bzip2Ifstream.h:108
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.
BZFILE * bzip2file_
bzip2 read handle attached to file_; nullptr when no file is open.
Definition Bzip2Ifstream.h:110
size_t n_buffer_
Number of bytes produced by the most recent read call.
Definition Bzip2Ifstream.h:112
Bzip2Ifstream & operator=(const Bzip2Ifstream &bzip2)
bool streamEnd() const
Whether the stream has been closed (end of file reached or no file opened).
Definition Bzip2Ifstream.h:129
Under certain circumstances you may want to build all dependencies from source code In order to facilitate the installation of the libraries required for OpenMS we provide a contrib package containing the following bzip2
Definition install-contrib.doxygen:5
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19