Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext
zlib::deflate_stream::reset (1 of 2 overloads)

Reset the stream and compression settings.

Synopsis
void
reset(
    int level,
    int windowBits,
    int memLevel,
    Strategy strategy);
Description

This function initializes the stream to the specified compression settings.

Although the stream is ready to be used immediately after a reset, any required internal buffers are not dynamically allocated until needed.

Parameters

Name

Description

level

Compression level from 0 to 9.

windowBits

The base two logarithm of the window size, or the history buffer. It should be in the range 9..15. A value of 8 is rejected, as zlib does for raw deflate streams, because deflate does not support a 256-byte window.

memLevel

How much memory should be allocated for the internal compression state, with level from from 1 to 9.

strategy

Strategy to tune the compression algorithm.

Exceptions

Type

Thrown On

std::invalid_argument

if a parameter is out of range.

Remarks

Any unprocessed input or pending output from previous calls are discarded.


PrevUpHomeNext