Class Poco::InflatingInputStream
Author: Applied Informatics Software Engineering GmbH and Contributors

# Poco

# class InflatingInputStream

Library: Foundation
Package: Streams
Header: Poco/InflatingStream.h

## Description

This stream decompresses all data passing through it using zlib's inflate algorithm. Example:

    std::ifstream istr("data.gz", std::ios::binary);
    InflatingInputStream inflater(istr, InflatingStreamBuf::STREAM_GZIP);
    std::string data;
    inflater >> data;

The underlying input stream can contain more than one gzip/deflate stream. After a gzip/deflate stream has been processed, reset() can be called to inflate the next stream.

## Inheritance

Direct Base Classes: std::istream, InflatingIOS

All Base Classes: InflatingIOS, std::ios, std::istream

## Member Summary

Member Functions: reset

Inherited Functions: rdbuf

## Constructors

### InflatingInputStream

InflatingInputStream(
std::istream & istr,
InflatingStreamBuf::StreamType type = InflatingStreamBuf::STREAM_ZLIB
);

Creates an InflatingInputStream for expanding the compressed data read from the given input stream.

### InflatingInputStream

InflatingInputStream(
std::istream & istr,
int windowBits
);

Creates an InflatingInputStream for expanding the compressed data read from the given input stream.

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

## Destructor

### ~InflatingInputStream

~InflatingInputStream();

Destroys the InflatingInputStream.

## Member Functions

### reset

void reset();

Resets the zlib machinery so that another zlib stream can be read from the same underlying input stream.