forked from SourMesen/Mesen
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathSZReader.h
More file actions
28 lines (24 loc) · 660 Bytes
/
SZReader.h
File metadata and controls
28 lines (24 loc) · 660 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
#pragma once
#include "stdafx.h"
#include "ArchiveReader.h"
#include "../SevenZip/7z.h"
#include "../SevenZip/7zAlloc.h"
#include "../SevenZip/7zCrc.h"
#include "../SevenZip/7zTypes.h"
#include "../SevenZip/7zMemBuffer.h"
class SZReader : public ArchiveReader
{
private:
CMemBufferInStream _memBufferStream;
CLookToRead _lookStream;
CSzArEx _archive;
ISzAlloc _allocImp{ SzAlloc, SzFree };
ISzAlloc _allocTempImp{ SzAllocTemp, SzFreeTemp };
protected:
bool InternalLoadArchive(void* buffer, size_t size);
vector<string> InternalGetFileList();
public:
SZReader();
virtual ~SZReader();
bool ExtractFile(string filename, vector<uint8_t> &output);
};