NDEVR
API Documentation
TAR::GzReaderfinal

Reader implementation for gzip-compressed files using zlib's gzFile interface. More...

Inheritance diagram for TAR::GzReader:
[legend]
Collaboration diagram for TAR::GzReader:
[legend]

Public Member Functions

 GzReader (const std::string &p)
 Constructs a GzReader and opens the specified gzip file for reading.
 ~GzReader () override
 Destructor that closes the gzip file handle if open.
bool eof () const override
 Checks whether the end of the gzip stream has been reached.
bool read_exact (u8 *dst, size_t n) override
 Reads exactly n bytes from the gzip stream into the destination buffer.

Public Attributes

gzFile g = nullptr
 The underlying zlib gzip file handle.

Detailed Description

Reader implementation for gzip-compressed files using zlib's gzFile interface.


Definition at line 79 of file TarReader.h.

Constructor & Destructor Documentation

◆ GzReader()

TAR::GzReader::GzReader ( const std::string & p)
inlineexplicit

Constructs a GzReader and opens the specified gzip file for reading.

Parameters
[in]pFile path to open.

Definition at line 86 of file TarReader.h.

References g.

Member Function Documentation

◆ eof()

bool TAR::GzReader::eof ( ) const
inlineoverridevirtual

Checks whether the end of the gzip stream has been reached.

Returns
True if at end of stream, false otherwise.

Implements TAR::Reader.

Definition at line 113 of file TarReader.h.

References g.

◆ read_exact()

bool TAR::GzReader::read_exact ( u8 * dst,
size_t n )
inlineoverridevirtual

Reads exactly n bytes from the gzip stream into the destination buffer.

Parameters
[in]dstPointer to the destination buffer.
[in]nNumber of bytes to read.
Returns
True if all bytes were successfully read, false otherwise.

Implements TAR::Reader.

Definition at line 99 of file TarReader.h.

References g.


The documentation for this struct was generated from the following file: