This commit is contained in:
parent
4392a7daa7
commit
cea037107f
1 changed files with 8 additions and 8 deletions
|
@ -1,17 +1,17 @@
|
||||||
|
|
||||||
#include "eyd_uncompressor.hh"
|
#include "eyd_uncompressor_rle1.hh"
|
||||||
|
|
||||||
namespace EydLib {
|
namespace EydLib {
|
||||||
|
|
||||||
/*
|
/*
|
||||||
class BitUncompressor {
|
class BitUncompressorRle1 {
|
||||||
private:
|
private:
|
||||||
BitGroup _last_group;
|
BitGroup _last_group;
|
||||||
int _last_count;
|
int _last_count;
|
||||||
std::list<BitGroup> _uncompressed;
|
std::list<BitGroup> _uncompressed;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
BitUncompressor();
|
BitUncompressorRle1();
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
void append(BitGroup bg);
|
void append(BitGroup bg);
|
||||||
|
@ -20,19 +20,19 @@ namespace EydLib {
|
||||||
};
|
};
|
||||||
*/
|
*/
|
||||||
|
|
||||||
BitUncompressor::BitUncompressor(int size) : _rle(size) {
|
BitUncompressorRle1::BitUncompressorRle1(int size) : _rle(size) {
|
||||||
_group_size = size;
|
_group_size = size;
|
||||||
_last_count = 0;
|
_last_count = 0;
|
||||||
_status = UNCOMPRESSOR_STATUS_NORMAL;
|
_status = UNCOMPRESSOR_STATUS_NORMAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitUncompressor::clear(){
|
void BitUncompressorRle1::clear(){
|
||||||
// we clear everything
|
// we clear everything
|
||||||
_last_count = 0;
|
_last_count = 0;
|
||||||
_uncompressed.clear();
|
_uncompressed.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void BitUncompressor::append(BitGroup data){
|
void BitUncompressorRle1::append(BitGroup data){
|
||||||
switch (_status){
|
switch (_status){
|
||||||
case UNCOMPRESSOR_STATUS_NORMAL:
|
case UNCOMPRESSOR_STATUS_NORMAL:
|
||||||
printf("STATUS NORMAL : %s\n", data.toString().c_str());
|
printf("STATUS NORMAL : %s\n", data.toString().c_str());
|
||||||
|
@ -72,7 +72,7 @@ namespace EydLib {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
std::list<BitGroup> BitUncompressor::flush(){
|
std::list<BitGroup> BitUncompressorRle1::flush(){
|
||||||
// we add the data from _last* to the outlist
|
// we add the data from _last* to the outlist
|
||||||
std::list<BitGroup> result;
|
std::list<BitGroup> result;
|
||||||
result = _uncompressed;
|
result = _uncompressed;
|
||||||
|
@ -80,7 +80,7 @@ namespace EydLib {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool BitUncompressor::hasContent(){
|
bool BitUncompressorRle1::hasContent(){
|
||||||
return (!_uncompressed.empty());
|
return (!_uncompressed.empty());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue