# Poco

# class InflatingStreamBuf

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

## Description

This is the streambuf class used by InflatingInputStream and InflatingOutputStream. The actual work is delegated to zlib 1.2.1 (see http://www.gzip.org). Both zlib (deflate) streams and gzip streams are supported. Output streams should always call close() to ensure proper completion of decompression.

## Inheritance

Direct Base Classes: BufferedStreamBuf

All Base Classes: BufferedStreamBuf

## Member Summary

Member Functions: close, readFromDevice, reset, writeToDevice

## Enumerations

### StreamType

STREAM_ZLIB

STREAM_GZIP

STREAM_ZIP

## Constructors

### InflatingStreamBuf

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

### InflatingStreamBuf

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

## Destructor

### ~InflatingStreamBuf

~InflatingStreamBuf();

## Member Functions

### close

int close();

### reset

void reset();

### readFromDevice

int readFromDevice(
char * buffer,
std::streamsize length
);

### writeToDevice

int writeToDevice(
const char * buffer,
std::streamsize length
);