37 #include <OpenMS/config.h>
70 size_t read(
char * s,
size_t n);
77 bool streamEnd()
const;
88 void open(
const char * filename);
115 return file_ !=
nullptr;
Decompresses files which are compressed in the bzip2 format (*.bz2)
Definition: Bzip2Ifstream.h:47
bool isOpen() const
returns whether a file is open.
Definition: Bzip2Ifstream.h:113
Bzip2Ifstream(const char *filename)
Detailed constructor with filename.
Bzip2Ifstream(const Bzip2Ifstream &bzip2)
int bzerror_
saves the last returned error by the read function
Definition: Bzip2Ifstream.h:103
Bzip2Ifstream & operator=(const Bzip2Ifstream &bzip2)
Bzip2Ifstream()
Default Constructor.
void open(const char *filename)
opens a file for reading (decompression)
void close()
closes current file.
bool stream_at_end_
true if end of file is reached
Definition: Bzip2Ifstream.h:105
FILE * file_
pointer to a FILE object. Necessary for opening the file
Definition: Bzip2Ifstream.h:97
size_t read(char *s, size_t n)
Reads n bytes from the bzip2 compressed file into buffer s.
virtual ~Bzip2Ifstream()
Destructor.
BZFILE * bzip2file_
a pointer to a BZFILE object. Necessary for decompression
Definition: Bzip2Ifstream.h:99
size_t n_buffer_
counts the last read buffer
Definition: Bzip2Ifstream.h:101
bool streamEnd() const
indicates whether the read function can be used safely
Definition: Bzip2Ifstream.h:118
Main OpenMS namespace.
Definition: FeatureDeconvolution.h:48