summaryrefslogtreecommitdiffstats
path: root/src/libs/7zip/unix/CPP/7zip/Archive/Nsis/NsisDecode.h
blob: 36aeb2b14573851c62825b676a47b61326ce3252 (plain)
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
// NsisDecode.h

#ifndef __NSIS_DECODE_H
#define __NSIS_DECODE_H

#include "../../IStream.h"

#include "../../Common/CreateCoder.h"

namespace NArchive {
namespace NNsis {

namespace NMethodType
{
  enum EEnum
  {
    kCopy,
    kDeflate,
    kBZip2,
    kLZMA
  };
}

class CDecoder
{
  NMethodType::EEnum _method;

  CMyComPtr<ISequentialInStream> _filterInStream;
  CMyComPtr<ISequentialInStream> _codecInStream;
  CMyComPtr<ISequentialInStream> _decoderInStream;

public:
  void Release()
  {
    _filterInStream.Release();
    _codecInStream.Release();
    _decoderInStream.Release();
  }
  HRESULT Init(
      DECL_EXTERNAL_CODECS_LOC_VARS
      IInStream *inStream, NMethodType::EEnum method, bool thereIsFilterFlag, bool &useFilter);
  HRESULT Read(void *data, size_t *processedSize);
};

}}

#endif