VHISTlib  1.84.0.3018
Public Member Functions
vhist::Inflater Class Reference

A class designed for inflating (decompressing using the flate method) streams of data. More...

#include <inflater.h>

List of all members.

Public Member Functions

 Inflater ()
 Creates a new Inflater.
 ~Inflater ()
 Destroys the Inflater.
QByteArray inflateData (QByteArray data)
 Inflates some data from the datastream.
bool hasFinished ()
 Returns whether the datastream has terminated, yet.
bool isValid ()
 Returns true if the datastream has not been corrupted so far.
void reset ()
 Resets the Inflater.

Detailed Description

A class designed for inflating (decompressing using the flate method) streams of data.

The Inflater reads chunks of data, inflates them and returns the decompressed counterpart. The data must not be passed in as one single QByteArray but can inflate the data incrementally by calling inflateData several times with consecutive parts of the data. This way, the amount of information in memory can be reduced to a limited fixed size of the user's choice.

Examples:

inflate_example.cpp.


Member Function Documentation

bool Inflater::hasFinished ( )

Returns whether the datastream has terminated, yet.

This is convenient if the size of the datastream is not known.

Returns:
Whether the datastream has reached an end.
Examples:
inflate_example.cpp.
QByteArray Inflater::inflateData ( QByteArray  data)

Inflates some data from the datastream.

You can check if the inflation was successful by querying the isValid() method of the Inflater.

Parameters:
[in]dataThe data which should be inflated.
Returns:
The inflated data. If an error occures during inflating the data, an empty QByteArray is returned.
Examples:
inflate_example.cpp.
bool Inflater::isValid ( )

Returns true if the datastream has not been corrupted so far.

Returns:
true if no corruption of the datastream did occur so far.
Examples:
inflate_example.cpp.
void Inflater::reset ( )

Resets the Inflater.

This way, a new datastream can be deflated by the same Inflater object.


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

VHISTlib 1.84.0.3018 of Jun 28 2013, generated by doxygen.