OLD | NEW |
| (Empty) |
1 // LzmaEncoder.h | |
2 | |
3 #ifndef __LZMA_ENCODER_H | |
4 #define __LZMA_ENCODER_H | |
5 | |
6 extern "C" | |
7 { | |
8 #include "../../../C/LzmaEnc.h" | |
9 } | |
10 | |
11 #include "../../Common/MyCom.h" | |
12 | |
13 #include "../ICoder.h" | |
14 | |
15 namespace NCompress { | |
16 namespace NLzma { | |
17 | |
18 struct CSeqInStream | |
19 { | |
20 ISeqInStream SeqInStream; | |
21 ISequentialInStream *RealStream; | |
22 }; | |
23 | |
24 struct CSeqOutStream | |
25 { | |
26 ISeqOutStream SeqOutStream; | |
27 CMyComPtr<ISequentialOutStream> RealStream; | |
28 HRESULT Res; | |
29 }; | |
30 | |
31 class CEncoder : | |
32 public ICompressCoder, | |
33 public ICompressSetOutStream, | |
34 public ICompressSetCoderProperties, | |
35 public ICompressWriteCoderProperties, | |
36 public CMyUnknownImp | |
37 { | |
38 CLzmaEncHandle _encoder; | |
39 | |
40 CSeqInStream _seqInStream; | |
41 CSeqOutStream _seqOutStream; | |
42 | |
43 public: | |
44 CEncoder(); | |
45 | |
46 MY_UNKNOWN_IMP3( | |
47 ICompressSetOutStream, | |
48 ICompressSetCoderProperties, | |
49 ICompressWriteCoderProperties | |
50 ) | |
51 | |
52 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream
, | |
53 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progre
ss); | |
54 STDMETHOD(SetCoderProperties)(const PROPID *propIDs, const PROPVARIANT *props,
UInt32 numProps); | |
55 STDMETHOD(WriteCoderProperties)(ISequentialOutStream *outStream); | |
56 STDMETHOD(SetOutStream)(ISequentialOutStream *outStream); | |
57 STDMETHOD(ReleaseOutStream)(); | |
58 | |
59 virtual ~CEncoder(); | |
60 }; | |
61 | |
62 }} | |
63 | |
64 #endif | |
OLD | NEW |