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

Output streambuf that compresses data with gzip on the fly. More...

#include <stream.hh>

Inheritance diagram for keepass::gzip_ostreambuf:

Public Member Functions

 gzip_ostreambuf (std::ostream &dst)
 Constructs a gzip-compressing streambuf.
 
 ~gzip_ostreambuf () override
 Destroys the streambuf, finalizing the gzip stream and releasing the zlib context.
 
int overflow (int c) override
 Buffers a character; deflates and writes the buffer when it reaches capacity.
 
int sync () override
 Flushes any buffered data and finalizes the gzip stream.
 

Detailed Description

Output streambuf that compresses data with gzip on the fly.

Accumulates data in an internal buffer and deflates it using zlib. The gzip stream is finalized when the streambuf is destroyed or sync is called.

Constructor & Destructor Documentation

◆ gzip_ostreambuf()

keepass::gzip_ostreambuf::gzip_ostreambuf ( std::ostream &  dst)
explicit

Constructs a gzip-compressing streambuf.

Parameters
dstThe output stream to write compressed data to.
Exceptions
InternalErrorIf the zlib deflate context cannot be initialized.

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