Welcome to mirror list, hosted at ThFree Co, Russian Federation.

CabCopyDecoder.h « Cab « Archive « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 21545d39039d89f940cfd4e9ddcf016cb3b384f9 (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
// CabCopyDecoder.h

#ifndef __ARCHIVE_CAB_COPY_DECODER_H
#define __ARCHIVE_CAB_COPY_DECODER_H

#include "Common/MyCom.h"
#include "../../ICoder.h"
#include "../../Common/OutBuffer.h"
#include "CabInBuffer.h"

namespace NArchive {
namespace NCab {

class CCopyDecoder:
  public ICompressCoder,
  public CMyUnknownImp
{
  CInBuffer m_InStream;
  COutBuffer m_OutStream;
  Byte m_ReservedSize;
  UInt32 m_NumInDataBlocks;
public:
  MY_UNKNOWN_IMP
  STDMETHOD(Code)(ISequentialInStream *inStream,
      ISequentialOutStream *outStream, 
      const UInt64 *inSize, const UInt64 *outSize,
      ICompressProgressInfo *progress);

  void ReleaseStreams();
  HRESULT Flush() { return m_OutStream.Flush(); }
  void SetParams(Byte reservedSize, UInt32 numInDataBlocks) 
  { 
    m_ReservedSize = reservedSize;
    m_NumInDataBlocks = numInDataBlocks;
  }
  
};

}}

#endif