libkeepass 0.2.0
KeePass key database importer/exporter library
Loading...
Searching...
No Matches
keepass::gzip_istreambuf Class Referencefinal

Input streambuf that decompresses gzip-compressed data on the fly. More...

#include <stream.hh>

Inheritance diagram for keepass::gzip_istreambuf:

Public Member Functions

 gzip_istreambuf (std::istream &src)
 Constructs a gzip-decompressing streambuf.
 
 gzip_istreambuf (std::istream &src, const detail::ResourceLimits &limits)
 Constructs a gzip-decompressing streambuf with resource limits.
 
 ~gzip_istreambuf () override
 Destroys the streambuf and releases the zlib inflate context.
 
bool BudgetExceeded () const
 Returns true if the decompressed size budget was exceeded while reading.
 
int underflow () override
 Inflates compressed data into the output buffer when the get area is exhausted.
 

Detailed Description

Input streambuf that decompresses gzip-compressed data on the fly.

Reads compressed data from the underlying stream and inflates it into an internal output buffer. Uses zlib's inflate with gzip decoding.

Constructor & Destructor Documentation

◆ gzip_istreambuf() [1/2]

keepass::gzip_istreambuf::gzip_istreambuf ( std::istream &  src)
inlineexplicit

Constructs a gzip-decompressing streambuf.

Parameters
srcThe input stream containing gzip-compressed data.
Exceptions
InternalErrorIf the zlib inflate context cannot be initialized.

◆ gzip_istreambuf() [2/2]

keepass::gzip_istreambuf::gzip_istreambuf ( std::istream &  src,
const detail::ResourceLimits &  limits 
)
inline

Constructs a gzip-decompressing streambuf with resource limits.

Parameters
srcThe input stream containing gzip-compressed data.
limitsThe resource budgets enforced while inflating.
Exceptions
InternalErrorIf the zlib inflate context cannot be initialized.

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