1 // LzmaEncoder.h
2 
3 #ifndef __LZMA_ENCODER_H
4 #define __LZMA_ENCODER_H
5 
6 #include "../../../C/LzmaEnc.h"
7 
8 #include "../../Common/MyCom.h"
9 
10 #include "../ICoder.h"
11 
12 namespace NCompress {
13 namespace NLzma {
14 
15 class CEncoder:
16   public ICompressCoder,
17   public ICompressSetCoderProperties,
18   public ICompressWriteCoderProperties,
19   public CMyUnknownImp
20 {
21   CLzmaEncHandle _encoder;
22   UInt64 _inputProcessed;
23 public:
24   MY_UNKNOWN_IMP2(ICompressSetCoderProperties, ICompressWriteCoderProperties)
25 
26   STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
27       const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
28   STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props, UInt32 numProps);
29   STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream);
30 
31   CEncoder();
32   virtual ~CEncoder();
GetInputProcessedSize()33   UInt64 GetInputProcessedSize() const { return _inputProcessed; }
34 };
35 
36 }}
37 
38 #endif
39