2020-01-21 21:50:13 +01:00
|
|
|
#include "huffmanstream.h"
|
|
|
|
|
2020-06-27 22:46:26 +02:00
|
|
|
bool HuffmanStreamF::init(bool line)
|
2020-01-21 21:50:13 +01:00
|
|
|
{
|
|
|
|
if (line) {
|
|
|
|
if (!(sign(_lonSign) && sign(_latSign)))
|
2020-06-27 22:46:26 +02:00
|
|
|
return false;
|
2020-01-21 21:50:13 +01:00
|
|
|
} else {
|
|
|
|
_lonSign = 0;
|
|
|
|
_latSign = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
quint32 eb;
|
2020-06-27 22:46:26 +02:00
|
|
|
if (!_bs.read(1, eb))
|
|
|
|
return false;
|
2020-09-29 22:03:26 +02:00
|
|
|
|
|
|
|
Q_ASSERT(!eb);
|
|
|
|
if (eb)
|
2020-01-21 21:50:13 +01:00
|
|
|
return false;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2020-06-27 22:46:26 +02:00
|
|
|
bool HuffmanStreamR::init()
|
2020-01-21 21:50:13 +01:00
|
|
|
{
|
2020-06-27 22:46:26 +02:00
|
|
|
if (!(sign(_lonSign) && sign(_latSign)))
|
2020-02-02 09:03:35 +01:00
|
|
|
return false;
|
2020-01-21 21:50:13 +01:00
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|
2020-09-18 20:56:00 +02:00
|
|
|
|
|
|
|
bool HuffmanStreamR::init(int lonSign, int latSign, quint32 data,
|
|
|
|
quint32 dataSize)
|
|
|
|
{
|
|
|
|
_lonSign = lonSign;
|
|
|
|
_latSign = latSign;
|
|
|
|
_symbolData = data;
|
|
|
|
_symbolDataSize = dataSize;
|
|
|
|
|
|
|
|
return true;
|
|
|
|
}
|