42 lines
674 B
C++
42 lines
674 B
C++
|
#ifndef _EYD_BITCOMPRESSOR_RLE2_HH
|
||
|
#define _EYD_BITCOMPRESSOR_RLE2_HH
|
||
|
|
||
|
#include <string>
|
||
|
#include <sys/types.h>
|
||
|
#include <sys/stat.h>
|
||
|
#include <fcntl.h>
|
||
|
#include <exception>
|
||
|
|
||
|
#include "eyd_bitgroup.hh"
|
||
|
|
||
|
#include "eyd_global.hh"
|
||
|
#include "eyd_iface.hh"
|
||
|
|
||
|
|
||
|
namespace EydLib {
|
||
|
|
||
|
class BitCompressorRle2 {
|
||
|
private:
|
||
|
BitGroup _rle;
|
||
|
int _last_count;
|
||
|
int _group_size;
|
||
|
std::list<BitGroup> _compressed;
|
||
|
|
||
|
void BitCompressorRle2::appendBit(bool bit);
|
||
|
|
||
|
public:
|
||
|
BitCompressorRle2::BitCompressorRle2();
|
||
|
|
||
|
void clear();
|
||
|
void append(BitGroup bg);
|
||
|
std::list<BitGroup> flush();
|
||
|
bool hasContent();
|
||
|
|
||
|
void flushRleData();
|
||
|
void flushRawData();
|
||
|
|
||
|
};
|
||
|
}
|
||
|
|
||
|
#endif
|