VHISTlib
1.84.0.3018
|
A class designed for inflating (decompressing using the flate method) streams of data. More...
#include <inflater.h>
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. |
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.
bool Inflater::hasFinished | ( | ) |
Returns whether the datastream has terminated, yet.
This is convenient if the size of the datastream is not known.
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.
[in] | data | The data which should be inflated. |
bool Inflater::isValid | ( | ) |
Returns true
if the datastream has not been corrupted so far.
true
if no corruption of the datastream did occur so far. void Inflater::reset | ( | ) |