41 lines
779 B
C++
41 lines
779 B
C++
#ifndef _EYD_BITUNCOMPRESSOR_HH
|
|
#define _EYD_BITUNCOMPRESSOR_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 {
|
|
typedef enum {UNCOMPRESSOR_STATUS_NORMAL, UNCOMPRESSOR_STATUS_GOTLEN, UNCOMPRESSOR_STATUS_GOTRLE} uncompressor_status_t;
|
|
|
|
class BitUncompressor {
|
|
private:
|
|
BitGroup _rle;
|
|
int _last_count;
|
|
int _group_size;
|
|
std::list<BitGroup> _uncompressed;
|
|
uncompressor_status_t _status;
|
|
|
|
public:
|
|
BitUncompressor::BitUncompressor(int size);
|
|
|
|
void clear();
|
|
void append(BitGroup bg);
|
|
std::list<BitGroup> flush();
|
|
bool hasContent();
|
|
|
|
void flushRleData();
|
|
void flushRawData();
|
|
|
|
};
|
|
}
|
|
|
|
#endif
|