m2.enlarge-your-data/src/lib/eyd_compressor_rle2.hh

45 lines
747 B
C++
Raw Normal View History

2005-10-31 07:35:01 +00:00
#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;
2005-10-31 17:54:08 +00:00
unsigned long int _input_size;
unsigned long int _output_size;
2005-10-31 07:35:01 +00:00
std::list<BitGroup> _compressed;
void BitCompressorRle2::appendBit(bool bit);
public:
2005-10-31 17:54:08 +00:00
BitCompressorRle2::BitCompressorRle2(int size);
2005-10-31 07:35:01 +00:00
void clear();
void append(BitGroup bg);
std::list<BitGroup> flush();
bool hasContent();
2005-10-31 17:54:08 +00:00
void forceFlush();
float getRatio();
2005-10-31 07:35:01 +00:00
};
}
#endif