-
Notifications
You must be signed in to change notification settings - Fork 0
/
ClassEncoder.h
65 lines (46 loc) · 1.31 KB
/
ClassEncoder.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
64
65
/*
* ClassEncoder.h
*
*
* Created by Narendra Chaudhary on 2/27/2015.
* Texas A&M University.
*
*/
#ifndef ClassEncoder_H_
#define ClassEncoder_H_
#ifndef Parameters_H_
#include "Parameters.h"
#endif
//#ifndef USE_PATTERN_MATCHING
#ifndef ClassPNG_H_
#include "ClassPNG.h"
#endif
#include <iostream>
#include <fstream>
#include <string>
//#include <map.h>
using namespace std;
class ClassEncoder: public ClassPNG
{
public:
ClassEncoder();
~ClassEncoder();
int Multibeam_split(string filename);
// serial Compression
void serial_prefix_compression(string filename, unsigned int stripe_length);
// Parallel Compression
void parallel_prefix_compression(string filename, unsigned int stripe_length);
// Entropy Encoder: AC
int EntropyEncoder_RLE(string filename,unsigned int Beamnumber,unsigned int length,int append);
// Write RLE data to text
void WriteBeam(string filename,unsigned int Beamnumber,unsigned int length, int istext,int append); // flag 1 for text, 0 for binary
// Entropy calculation
double Entropy(int beamnumber);
// deflate
int deflate_compression(string filename);
// Transformation + RLE + EOB: Image -> Corner/Paeth -> RLE+EOB
int Transform_RLE_EOB(unsigned char* Map, int No_of_Map);
// Entropy Encoder: AC
int EntropyEncoder_AC(string filename);
};
#endif