zlibcomplete
Simple C++ wrapper for zlib using RAII and std::string with flush.
|
Raw ZLib decompression class using std::string for input and output. More...
#include <zlibraw.hpp>
Public Member Functions | |
RawInflater (int windowBits=15) | |
Constructs a Raw ZLib decompressor. More... | |
~RawInflater (void) | |
std::string | inflate (const std::string &input) |
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.
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.
window_bits | An 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 | ) |
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.
input | Any amount of data to decompress. |
std::string | containing the decompressed data. |