Public Member Functions | Private Attributes | List of all members
gzifstream Class Reference

Gzipped file input stream class. More...

#include <zfstream.h>

Inheritance diagram for gzifstream:
Inheritance graph
[legend]

Public Member Functions

void attach (int fd, std::ios_base::openmode mode=std::ios_base::in)
 Attach to already open gzipped file. More...
 
void attach (int fd, std::ios_base::openmode mode=std::ios_base::in)
 Attach to already open gzipped file. More...
 
void close ()
 Close gzipped file. More...
 
void close ()
 Close gzipped file. More...
 
 gzifstream ()
 
 gzifstream ()
 
 gzifstream ()
 
 gzifstream ()
 
 gzifstream (const char *name, int io_mode=ios::in)
 
 gzifstream (const char *name, 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. More...
 
 gzifstream (const char *name, std::ios_base::openmode mode=std::ios_base::in)
 Construct stream on gzipped file to be opened. More...
 
 gzifstream (int fd, int io_mode=ios::in)
 
 gzifstream (int fd, int io_mode=ios::in)
 
 gzifstream (int fd, std::ios_base::openmode mode=std::ios_base::in)
 Construct stream on already open gzipped file. More...
 
 gzifstream (int fd, std::ios_base::openmode mode=std::ios_base::in)
 Construct stream on already open gzipped file. More...
 
bool is_open ()
 Check if file is open. More...
 
bool is_open ()
 Check if file is open. More...
 
void open (const char *name, std::ios_base::openmode mode=std::ios_base::in)
 Open gzipped file. More...
 
void open (const char *name, std::ios_base::openmode mode=std::ios_base::in)
 Open gzipped file. More...
 
gzfilebufrdbuf () const
 
gzfilebufrdbuf () const
 
virtual ~gzifstream ()
 
virtual ~gzifstream ()
 
- Public Member Functions inherited from gzfilestream_common
void attach (int fd, int io_mode)
 
void attach (int fd, int io_mode)
 
void close ()
 
void close ()
 
void open (const char *name, int io_mode)
 
void open (const char *name, int io_mode)
 
virtual ~gzfilestream_common ()
 
virtual ~gzfilestream_common ()
 

Private Attributes

gzfilebuf sb
 

Additional Inherited Members

- Protected Member Functions inherited from gzfilestream_common
 gzfilestream_common ()
 
 gzfilestream_common ()
 

Detailed Description

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 bloaty/third_party/zlib/contrib/iostream/zfstream.h.

Constructor & Destructor Documentation

◆ gzifstream() [1/12]

gzifstream::gzifstream ( )

◆ gzifstream() [2/12]

gzifstream::gzifstream ( const char *  name,
int  io_mode = ios::in 
)

◆ gzifstream() [3/12]

gzifstream::gzifstream ( int  fd,
int  io_mode = ios::in 
)

◆ ~gzifstream() [1/2]

gzifstream::~gzifstream ( )
virtual

◆ gzifstream() [4/12]

gzifstream::gzifstream ( )

◆ gzifstream() [5/12]

gzifstream::gzifstream ( const char *  name,
std::ios_base::openmode  mode = std::ios_base::in 
)
explicit

Construct stream on gzipped file to be opened.

Parameters
nameFile name.
modeOpen mode flags (forced to contain ios::in).

Definition at line 379 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.cc.

◆ gzifstream() [6/12]

gzifstream::gzifstream ( int  fd,
std::ios_base::openmode  mode = std::ios_base::in 
)
explicit

Construct stream on already open gzipped file.

Parameters
fdFile descriptor.
modeOpen mode flags (forced to contain ios::in).

Definition at line 388 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.cc.

◆ gzifstream() [7/12]

gzifstream::gzifstream ( )

◆ gzifstream() [8/12]

gzifstream::gzifstream ( const char *  name,
int  io_mode = ios::in 
)

◆ gzifstream() [9/12]

gzifstream::gzifstream ( int  fd,
int  io_mode = ios::in 
)

◆ ~gzifstream() [2/2]

virtual gzifstream::~gzifstream ( )
virtual

◆ gzifstream() [10/12]

gzifstream::gzifstream ( )

◆ gzifstream() [11/12]

gzifstream::gzifstream ( const char *  name,
std::ios_base::openmode  mode = std::ios_base::in 
)
explicit

Construct stream on gzipped file to be opened.

Parameters
nameFile name.
modeOpen mode flags (forced to contain ios::in).

◆ gzifstream() [12/12]

gzifstream::gzifstream ( int  fd,
std::ios_base::openmode  mode = std::ios_base::in 
)
explicit

Construct stream on already open gzipped file.

Parameters
fdFile descriptor.
modeOpen mode flags (forced to contain ios::in).

Member Function Documentation

◆ attach() [1/2]

void gzifstream::attach ( int  fd,
std::ios_base::openmode  mode = std::ios_base::in 
)

Attach to already open gzipped file.

Parameters
fdFile descriptor.
modeOpen mode flags (forced to contain ios::in).

Stream will be in state good() if attach succeeded; otherwise in state fail().

Definition at line 409 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.cc.

◆ attach() [2/2]

void gzifstream::attach ( int  fd,
std::ios_base::openmode  mode = std::ios_base::in 
)

Attach to already open gzipped file.

Parameters
fdFile descriptor.
modeOpen mode flags (forced to contain ios::in).

Stream will be in state good() if attach succeeded; otherwise in state fail().

◆ close() [1/2]

void gzifstream::close ( )

Close gzipped file.

Stream will be in state fail() if close failed.

Definition at line 420 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.cc.

◆ close() [2/2]

void gzifstream::close ( )

Close gzipped file.

Stream will be in state fail() if close failed.

◆ is_open() [1/2]

bool gzifstream::is_open ( )
inline

Check if file is open.

Returns
True if file is open.

Definition at line 270 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.h.

◆ is_open() [2/2]

bool gzifstream::is_open ( )
inline

Check if file is open.

Returns
True if file is open.

Definition at line 270 of file zlib/contrib/iostream3/zfstream.h.

◆ open() [1/2]

void gzifstream::open ( const char *  name,
std::ios_base::openmode  mode = std::ios_base::in 
)

Open gzipped file.

Parameters
nameFile name.
modeOpen 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.

◆ open() [2/2]

void gzifstream::open ( const char *  name,
std::ios_base::openmode  mode = std::ios_base::in 
)

Open gzipped file.

Parameters
nameFile name.
modeOpen 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.

Definition at line 398 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.cc.

◆ rdbuf() [1/2]

gzfilebuf* gzifstream::rdbuf ( ) const
inline

Obtain underlying stream buffer.

Definition at line 262 of file zlib/contrib/iostream3/zfstream.h.

◆ rdbuf() [2/2]

gzfilebuf* gzifstream::rdbuf ( ) const
inline

Obtain underlying stream buffer.

Definition at line 262 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.h.

Member Data Documentation

◆ sb

gzfilebuf gzifstream::sb
private

Underlying stream buffer.

Definition at line 312 of file bloaty/third_party/zlib/contrib/iostream3/zfstream.h.


The documentation for this class was generated from the following files:


grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:46