Gzipped file input stream class. More...
#include <zfstream.h>


Public Member Functions | |
| gzifstream (const char *name, int io_mode=ios::in) | |
| gzifstream (int fd, int io_mode=ios::in) | |
| gzifstream (const char *name, std::ios_base::openmode mode=std::ios_base::in) | |
| Construct stream on gzipped file to be opened. | |
| gzifstream (int fd, std::ios_base::openmode mode=std::ios_base::in) | |
| Construct stream on already open gzipped file. | |
| gzfilebuf * | rdbuf () const |
| bool | is_open () |
| Check if file is open. | |
| void | open (const char *name, std::ios_base::openmode mode=std::ios_base::in) |
| Open gzipped file. | |
| void | attach (int fd, std::ios_base::openmode mode=std::ios_base::in) |
| Attach to already open gzipped file. | |
| void | close () |
| Close gzipped file. | |
Gzipped file input stream class.
This class implements ifstream for gzipped files. Seeking and putback is not supported yet.
Definition at line 68 of file zfstream.h.
| gzifstream | ( | const char * | name, |
| std::ios_base::openmode | mode = std::ios_base::in |
||
| ) | [explicit] |
Construct stream on gzipped file to be opened.
| name | File name. |
| mode | Open mode flags (forced to contain ios::in). |
| gzifstream | ( | int | fd, |
| std::ios_base::openmode | mode = std::ios_base::in |
||
| ) | [explicit] |
Construct stream on already open gzipped file.
| fd | File descriptor. |
| mode | Open mode flags (forced to contain ios::in). |
| void attach | ( | int | fd, |
| std::ios_base::openmode | mode = std::ios_base::in |
||
| ) |
Attach to already open gzipped file.
| fd | File descriptor. |
| mode | Open mode flags (forced to contain ios::in). |
Stream will be in state good() if attach succeeded; otherwise in state fail().
| void close | ( | ) |
Close gzipped file.
Stream will be in state fail() if close failed.
Reimplemented from gzfilestream_common.
| bool is_open | ( | ) | [inline] |
| void open | ( | const char * | name, |
| std::ios_base::openmode | mode = std::ios_base::in |
||
| ) |
Open gzipped file.
| name | File name. |
| mode | Open mode flags (forced to contain ios::in). |
Stream will be in state good() if file opens successfully; otherwise in state fail(). This differs from the behavior of ifstream, which never sets the state to good() and therefore won't allow you to reuse the stream for a second file unless you manually clear() the state. The choice is a matter of convenience.
| gzfilebuf* rdbuf | ( | ) | const [inline] |
Obtain underlying stream buffer.
Definition at line 262 of file zfstream.h.
1.7.2