-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDecompress.h
More file actions
39 lines (29 loc) · 804 Bytes
/
Decompress.h
File metadata and controls
39 lines (29 loc) · 804 Bytes
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
31
32
33
34
35
36
37
38
39
#ifndef DECOMPRESS_H
#define DECOMPRESS_H
#include <map>
#include <string>
#include <vector>
#include <memory>
#include <fstream>
using std::string, std::vector, std::map, std::shared_ptr;
class Decompress
{
string codeStream;
vector<string> dictionary;
string prevLine;
string filepathDirs;
string outfilePath;
std::ofstream outfile;
string readBitsFromCodeStream(size_t start, size_t bitsToRead);
string rle(size_t startingIndex);
string bitmask(size_t startingIndex);
string consecutiveBitMismatch(size_t startingIndex, unsigned int bits);
string twoBitAnyMismatch(size_t startingIndex);
void initCodeStream();
void decompLoop();
public:
Decompress(string filepathDirs);
~Decompress();
void run();
};
#endif // DECOMPRESS_H