-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdecompress.h
43 lines (37 loc) · 884 Bytes
/
decompress.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
#ifndef DECOMPRESS_H
#define DECOMPRESS_H
#include <QString>
#include <QImage>
#include <iostream>
#include <QDebug>
extern "C"
{
#include "unarr.h"
//#include "7z.h"
}
//class decompress the archieve file
class Decompress
{
public:
Decompress();
~Decompress();
// Open archive file and decompress
void decFiles(QVector<QString>& nameList, int& totalPages);
// Get file from decompress archive
void getFiles(const char* filename);
// Get file number in the archive
int getEntryNumber();
size_t getEntrySize();
QString getEntryName();
void setPath(QString _path);
unsigned char* getBuffer();
private:
ar_archive *listing;
ar_stream *streaming;
int indicator; //zip indicator
unsigned char buffer[1024*1024*2];
const char *path;
const char *entryName;
size_t entrySize;
};
#endif // DECOMPRESS_H