-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.h
30 lines (25 loc) · 739 Bytes
/
main.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include <iostream>
#include <vector>
#include <map>
using std::vector;
using std::string;
using std::cout;
class MessageCodec
{
public:
virtual vector<int> encode(unsigned long, vector<int>& ) =0; //Function to encode the binary payload using RLE
virtual vector<int> decode(unsigned long, vector<int>& ) =0; //Function to decode the RLE code back to the original binary payload
};
class Message
{
public:
std::map<string, string> function();
vector<int> returnArray(char* binary_payload_path);
};
class Codec : public MessageCodec
{
public:
vector<int> encode(unsigned long size, vector<int>& byte_stream) override;
vector<int> decode(unsigned long size, vector<int>& encoded_stream) override;
};