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

ZipAddCommon.h « Zip « Archive « 7zip - github.com/kornelski/7z.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 4da3840f39c9cb62938acddfd7faf5e3419441b8 (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
48
49
50
// Zip/AddCommon.h

#ifndef __ZIP_ADDCOMMON_H
#define __ZIP_ADDCOMMON_H

#include "../../ICoder.h"
#include "../../IProgress.h"
#include "../../Compress/Copy/CopyCoder.h"
#ifndef COMPRESS_DEFLATE
#include "../Common/CoderLoader.h"
#endif
#include "../Common/FilterCoder.h"
#include "ZipCompressionMode.h"
#include "../../Crypto/Zip/ZipCipher.h"

namespace NArchive {
namespace NZip {

struct CCompressingResult
{
  Byte Method;
  UInt64 PackSize;
  Byte ExtractVersion;
};

class CAddCommon
{
  CCompressionMethodMode _options;
  NCompress::CCopyCoder *_copyCoderSpec;
  CMyComPtr<ICompressCoder> _copyCoder;

  #ifndef COMPRESS_DEFLATE
  CCoderLibrary _compressLib;
  #endif
  CMyComPtr<ICompressCoder> _compressEncoder;

  CFilterCoder *_cryptoStreamSpec;
  CMyComPtr<ISequentialOutStream> _cryptoStream;

  NCrypto::NZip::CEncoder *_filterSpec;

public:
  CAddCommon(const CCompressionMethodMode &options);
  HRESULT Compress(IInStream *inStream, IOutStream *outStream, 
      UInt64 inSize, ICompressProgressInfo *progress, CCompressingResult &operationResult);
};

}}

#endif