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

42 lines
637 B
C++
Raw Normal View History

2005-10-29 22:51:22 +00:00
#ifndef _EYD_BITCOMPRESSOR_HH
#define _EYD_BITCOMPRESSOR_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 BitCompressor {
private:
BitGroup _rle;
BitGroup _last_group;
int _last_count;
2005-10-30 20:25:32 +00:00
int _group_size;
2005-10-29 22:51:22 +00:00
std::list<BitGroup> _compressed;
public:
2005-10-30 20:25:32 +00:00
BitCompressor::BitCompressor(int size);
2005-10-29 22:51:22 +00:00
void clear();
void append(BitGroup bg);
std::list<BitGroup> flush();
bool hasContent();
2005-10-29 23:24:52 +00:00
void flushRleData();
void flushRawData();
2005-10-29 22:51:22 +00:00
};
}
#endif