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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
// Rar29Decoder.h
// According to unRAR license,
// this code may not be used to develop a
// RAR (WinRAR) compatible archiver
#ifndef __RAR_DECODER_H
#define __RAR_DECODER_H
#include "Common/MyCom.h"
#include "../../ICoder.h"
#include "Original/rar.hpp"
namespace NCompress {
namespace NRar29 {
class CDecoder :
public ICompressCoder,
public ICompressSetDecoderProperties2,
public CMyUnknownImp
{
Unpack *Unp;
bool m_IsSolid;
public:
ComprDataIO DataIO;
CDecoder();
~CDecoder();
/*
class CCoderReleaser
{
CCoder *m_Coder;
public:
CCoderReleaser(CCoder *aCoder): m_Coder(aCoder) {}
~CCoderReleaser()
{
m_Coder->DataIO.ReleaseStreams();
}
};
*/
MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
// void ReleaseStreams();
STDMETHOD(CodeReal)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
STDMETHOD(Code)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
};
}
namespace NRar15{
class CDecoder :
public ICompressCoder,
public ICompressSetDecoderProperties2,
public CMyUnknownImp
{
Unpack *Unp;
bool m_IsSolid;
public:
ComprDataIO DataIO;
CDecoder();
~CDecoder();
/*
class CCoderReleaser
{
CDecoder *m_Coder;
public:
CCoderReleaser(CDecoder *coder): m_Coder(coder) {}
~CCoderReleaser()
{
m_Coder->DataIO.ReleaseStreams();
}
};
*/
MY_UNKNOWN_IMP1(ICompressSetDecoderProperties2)
// void ReleaseStreams();
STDMETHOD(CodeReal)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
STDMETHOD(Code)(ISequentialInStream *inStream,
ISequentialOutStream *outStream, const UInt64 *inSize, const UInt64 *outSize,
ICompressProgressInfo *progress);
STDMETHOD(SetDecoderProperties2)(const Byte *data, UInt32 size);
};
}
}
#endif
|