Class Poco::DeflatingOutputStream
Author: Applied Informatics Software Engineering GmbH and Contributors
Date: 2009-11-24

# Poco

# class DeflatingOutputStream

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

## Description

This stream compresses all data passing through it using zlib's deflate algorithm. After all data has been written to the stream, close() must be called to ensure completion of compression. Example:

    std::ofstream ostr("data.gz", std::ios::binary);
    DeflatingOutputStream deflater(ostr, DeflatingStreamBuf::STREAM_GZIP);
    deflater << "Hello, world!" << std::endl;
    deflater.close();
    ostr.close();

## Inheritance

Direct Base Classes: DeflatingIOS, std::ostream

All Base Classes: DeflatingIOS, std::ios, std::ostream

## Member Summary

Member Functions: close

Inherited Functions: rdbuf

## Constructors

### DeflatingOutputStream

DeflatingOutputStream(
std::ostream & ostr,
DeflatingStreamBuf::StreamType type = DeflatingStreamBuf::STREAM_ZLIB,
int level = (- 1)
);

## Destructor

### ~DeflatingOutputStream

~DeflatingOutputStream();

## Member Functions

### close

int close();