comparison src/win32/7zip/7z/CPP/7zip/Compress/ZlibDecoder.h @ 1:f9f4f1b99eed

importing src directory
author Robert McIntyre <rlm@mit.edu>
date Sat, 03 Mar 2012 10:31:27 -0600
parents
children
comparison
equal deleted inserted replaced
0:8ced16adf2e1 1:f9f4f1b99eed
1 // ZlibDecoder.h
2
3 #ifndef __ZLIB_DECODER_H
4 #define __ZLIB_DECODER_H
5
6 #include "DeflateDecoder.h"
7
8 namespace NCompress {
9 namespace NZlib {
10
11 const UInt32 ADLER_INIT_VAL = 1;
12
13 class COutStreamWithAdler:
14 public ISequentialOutStream,
15 public CMyUnknownImp
16 {
17 CMyComPtr<ISequentialOutStream> _stream;
18 UInt32 _adler;
19 public:
20 MY_UNKNOWN_IMP
21 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);
22 void SetStream(ISequentialOutStream *stream) { _stream = stream; }
23 void ReleaseStream() { _stream.Release(); }
24 void Init() { _adler = ADLER_INIT_VAL; }
25 UInt32 GetAdler() const { return _adler; }
26 };
27
28 class CDecoder:
29 public ICompressCoder,
30 public CMyUnknownImp
31 {
32 COutStreamWithAdler *AdlerSpec;
33 CMyComPtr<ISequentialOutStream> AdlerStream;
34
35 NCompress::NDeflate::NDecoder::CCOMCoder *DeflateDecoderSpec;
36 CMyComPtr<ICompressCoder> DeflateDecoder;
37 public:
38 STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream,
39 const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress);
40
41 MY_UNKNOWN_IMP
42 };
43
44 }}
45
46 #endif