zlibcomplete
Simple C++ wrapper for zlib using RAII and std::string with flush.
 All Classes Namespaces Files Functions Enumerations Enumerator Macros Pages
Public Member Functions | List of all members
zlibcomplete::RawInflater Class Reference

Raw ZLib decompression class using std::string for input and output. More...

#include <zlibraw.hpp>

Inheritance diagram for zlibcomplete::RawInflater:

Public Member Functions

 RawInflater (int windowBits=15)
 Constructs a Raw ZLib decompressor. More...
 
 ~RawInflater (void)
 
std::string inflate (const std::string &input)
 

Detailed Description

Raw ZLib decompression class using std::string for input and output.

Implements zlib decompression using std::string for input and output. To use, simply call decompress() zero or more times. Because the raw compressed stream has no header, it is necessary to ensure that the same window_bits parameter is used for the RawDeflater and RawInflater. This class implements RFC 1951.

Constructor & Destructor Documentation

zlibcomplete::RawInflater::RawInflater ( int  windowBits = 15)

Constructs a Raw ZLib decompressor.

Accepts a number of window_bits that must match that used with the RawDeflater.

Parameters
window_bitsAn integer between 8 and 15 to control the window_size. Defaults to 15. This must match the window_bits used in the RawDeflater.
zlibcomplete::RawInflater::~RawInflater ( void  )

Member Function Documentation

std::string zlibcomplete::RawInflater::inflate ( const std::string &  input)

Accepts a std::string of any size containing compressed data. Returns as much zlib uncompressed data as possible. Call this function over and over with all the compressed data in a stream in order to decompress the entire stream.

Parameters
inputAny amount of data to decompress.
Return values
std::stringcontaining the decompressed data.

The documentation for this class was generated from the following files: