VHISTlib  1.84.0.3018
inflate_example.cpp

An example which shows how to use the Inflater class.

/* $HEADERS
 $Id: inflate_example.cpp 2179 2011-06-24 09:03:24Z ahuesgen $
 */

#include <unvhistlib/inflater.h>

// ...

// create a new inflater
vhist::Inflater inflater;

// inflate all data
while (!inflater.hasFinished() && inflater.isValid())
{
    QByteArray bytes = readNextBytes();
    writeBytesToDestination(inflater.inflateData(bytes));
}

// check if decompression was successful
if (inflater.isValid())
    std::cout << "success" << std::endl;
else
    std::cout << "inflation failed" << std::endl;


VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.