class Poco::InflatingOutputStream

Overview

This stream decompresses all data passing through it using zlib’s inflate algorithm. More…

#include <InflatingStream.h>

class InflatingOutputStream:
    public ostream,
    public Poco::InflatingIOS
{
public:
    // construction

    InflatingOutputStream(
        std::ostream& ostr,
        InflatingStreamBuf::StreamType type = InflatingStreamBuf::STREAM_ZLIB
        );

    InflatingOutputStream(
        std::ostream& ostr,
        int windowBits
        );

    // methods

    int
    close();
};

Inherited Members

public:
    // methods

    InflatingStreamBuf*
    rdbuf();

protected:
    // fields

    InflatingStreamBuf _buf;

Detailed Documentation

This stream decompresses all data passing through it using zlib’s inflate algorithm.

After all data has been written to the stream, close() must be called to ensure completion of decompression.

Construction

InflatingOutputStream(
    std::ostream& ostr,
    InflatingStreamBuf::StreamType type = InflatingStreamBuf::STREAM_ZLIB
    )

Creates an InflatingOutputStream for expanding the compressed data passed through and forwarding it to the given output stream.

InflatingOutputStream(
    std::ostream& ostr,
    int windowBits
    )

Creates an InflatingOutputStream for expanding the compressed data passed through and forwarding it to the given output stream.

Please refer to the zlib documentation of inflateInit2() for a description of the windowBits parameter.

Methods

int
close()

Finishes up the stream.

Must be called to ensure all data is properly written to the target output stream.