m2.enlarge-your-data/src/lib/eyd_uncompressor_rle1.hh
2005-10-31 07:34:44 +00:00

46 lines
834 B
C++

#ifndef _EYD_BITUNCOMPRESSOR_RLE1_HH
#define _EYD_BITUNCOMPRESSOR_RLE1_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_RLE1_STATUS_NORMAL,
UNCOMPRESSOR_RLE1_STATUS_GOTLEN,
UNCOMPRESSOR_RLE1_STATUS_GOTRLE
} uncompressorRle1_status_t;
class BitUncompressorRle1 {
private:
BitGroup _rle;
int _last_count;
int _group_size;
std::list<BitGroup> _uncompressed;
uncompressorRle1_status_t _status;
public:
BitUncompressorRle1::BitUncompressorRle1(int size);
void clear();
void append(BitGroup bg);
std::list<BitGroup> flush();
bool hasContent();
void flushRleData();
void flushRawData();
};
}
#endif