15 lines
321 B
C++

#include <vector>
#include <cstdint>
#include "BitWriter.h"
class Compressor
{
public:
BitWriter writer;
void compress(std::vector<std::vector<uint8_t>> &matrix);
private:
void IC(std::vector<int> &C, int L, int H);
std::vector<int> predict(std::vector<std::vector<uint8_t>> &P);
void encode(int v, int g);
};