stuff-from-scratch/src/compression/RunLengthEncoder.h

16 lines
273 B
C
Raw Normal View History

2022-11-21 17:45:12 +00:00
#pragma once
#include <vector>
class RunLengthEncoder
{
public:
2022-11-28 10:16:04 +00:00
using Hit = std::pair<unsigned char, unsigned>;
2022-11-21 17:45:12 +00:00
2022-11-28 10:16:04 +00:00
std::vector<Hit> encode(const std::vector<unsigned char>& input);
2022-11-21 17:45:12 +00:00
2022-11-28 10:16:04 +00:00
std::vector<unsigned char> decode(const std::vector<Hit>& input);
2022-11-21 17:45:12 +00:00
private:
};