OpenMS
2.7.0
|
Decompresses files which are compressed in the gzip format (*.gzip) More...
#include <OpenMS/FORMAT/GzipIfstream.h>
Public Member Functions | |
GzipIfstream () | |
Default Constructor. More... | |
GzipIfstream (const char *filename) | |
Detailed constructor with filename. More... | |
virtual | ~GzipIfstream () |
Destructor. More... | |
size_t | read (char *s, size_t n) |
Reads n bytes from the bzip2 compressed file into buffer s. More... | |
bool | streamEnd () const |
indicates whether the read function can be used safely More... | |
bool | isOpen () const |
returns whether a file is open. More... | |
void | open (const char *filename) |
opens a file for reading (decompression) More... | |
void | close () |
closes current file. More... | |
Protected Member Functions | |
GzipIfstream (const GzipIfstream &bzip2) | |
not implemented More... | |
GzipIfstream & | operator= (const GzipIfstream &bzip2) |
Protected Attributes | |
gzFile | gzfile_ |
a gzFile object(void*) . Necessary for decompression More... | |
int | n_buffer_ |
counts the last read duffer More... | |
int | gzerror_ |
saves the last returned error by the read function More... | |
bool | stream_at_end_ |
true if end of file is reached More... | |
Decompresses files which are compressed in the gzip format (*.gzip)
GzipIfstream | ( | ) |
Default Constructor.
|
explicit |
Detailed constructor with filename.
|
virtual |
Destructor.
|
protected |
not implemented
void close | ( | ) |
closes current file.
|
inline |
returns whether a file is open.
References GzipIfstream::gzfile_.
Referenced by GzipInputStream::getIsOpen().
void open | ( | const char * | filename | ) |
opens a file for reading (decompression)
|
protected |
size_t read | ( | char * | s, |
size_t | n | ||
) |
Reads n bytes from the bzip2 compressed file into buffer s.
s | Buffer to be filled with the output |
n | The size of the buffer s |
Exception::ConversionError | is thrown if decompression fails |
Exception::IllegalArgument | is thrown if no file for decompression is given. This can happen even happen if a file was already open but read until the end. |
|
inline |
indicates whether the read function can be used safely
References GzipIfstream::stream_at_end_.
|
protected |
saves the last returned error by the read function
|
protected |
a gzFile object(void*) . Necessary for decompression
Referenced by GzipIfstream::isOpen().
|
protected |
counts the last read duffer
|
protected |
true if end of file is reached
Referenced by GzipIfstream::streamEnd().