-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRePairRecursive.h
63 lines (46 loc) · 1.23 KB
/
RePairRecursive.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
//
// Created by ale on 02-07-20.
//
#ifndef RRPAIR_REPAIRRECURSIVE_H
#define RRPAIR_REPAIRRECURSIVE_H
#include <string>
namespace big_repair{
template <
typename C // config object
>
class RePairRecursive {
public:
RePairRecursive(){ config = nullptr; }
RePairRecursive(const C& c) {
config = c;
}
RePairRecursive(const RePairRecursive & R) {
this->config = R.config ;
}
~RePairRecursive() = default;
/**
* Compress the file using a recursively version of repair
*/
void apply(){
while(!config.stopCondition())
{
/**
* partitioner method must create two files file_dicc and file_parse as integers
* and Preprocess dicc file in order to be able apply repair
* */
config.parseIt();
}
/**
* Apply repair to all files
* */
config.compressor();
/**
* Posprocessing files
*/
config.postprocess();
}
protected:
C config;
};
}
#endif //RRPAIR_REPAIRRECURSIVE_H