Decompresses files which are compressed in the gzip format (*.gzip). More...
#include <OpenMS/FORMAT/GzipIfstream.h>
Public Member Functions | |
| GzipIfstream () | |
| Default Constructor. | |
| GzipIfstream (const char *filename) | |
| Detailed constructor with filename. | |
| virtual | ~GzipIfstream () |
| Destructor. | |
| size_t | read (char *s, size_t n) |
| reads n bytes from the gzip compressed file into buffer s | |
| bool | streamEnd () const |
| indicates whether the read function can be used safely | |
| bool | isOpen () const |
| returns whether a file is open. | |
| void | open (const char *filename) |
| opens a file for reading (decompression) | |
| void | close () |
| closes current file. | |
Protected Member Functions | |
| GzipIfstream (const GzipIfstream &bzip2) | |
| not implemented | |
| GzipIfstream & | operator= (const GzipIfstream &bzip2) |
Protected Attributes | |
| gzFile | gzfile_ |
| a gzFile object(void*) . Necessary for decompression | |
| int | n_buffer_ |
| counts the last read bufffer | |
| int | gzerror_ |
| saves the last returned error by the read function | |
| bool | stream_at_end_ |
| true if end of file is reached | |
Decompresses files which are compressed in the gzip format (*.gzip).
| GzipIfstream | ( | ) |
Default Constructor.
| GzipIfstream | ( | const char * | filename | ) |
Detailed constructor with filename.
| virtual ~GzipIfstream | ( | ) | [virtual] |
Destructor.
| GzipIfstream | ( | const GzipIfstream & | bzip2 | ) | [protected] |
not implemented
| void close | ( | ) |
closes current file.
| bool isOpen | ( | ) | const [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)
| GzipIfstream& operator= | ( | const GzipIfstream & | bzip2 | ) | [protected] |
| size_t read | ( | char * | s, | |
| size_t | n | |||
| ) |
reads n bytes from the gzip compressed file into buffer s
| s | will be filled with bytes | |
| n | is the size of the buffer s |
| Exception::ConversionError | is thrown if decompression fails | |
| Exception::IllegalArgument | is thrwon if no file for decompression is given. This can happen even happen if a file was already open but read until the end. |
| bool streamEnd | ( | ) | const [inline] |
indicates whether the read function can be used safely
References GzipIfstream::stream_at_end_.
int gzerror_ [protected] |
saves the last returned error by the read function
gzFile gzfile_ [protected] |
a gzFile object(void*) . Necessary for decompression
Referenced by GzipIfstream::isOpen().
int n_buffer_ [protected] |
counts the last read bufffer
bool stream_at_end_ [protected] |
true if end of file is reached
Referenced by GzipIfstream::streamEnd().
| OpenMS / TOPP release 1.10.0 | Documentation generated on Thu Mar 7 2013 09:42:53 using doxygen 1.7.1 |