Mercurial > vba-linux
diff 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 |
line wrap: on
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/win32/7zip/7z/CPP/7zip/Compress/ZlibDecoder.h Sat Mar 03 10:31:27 2012 -0600 1.3 @@ -0,0 +1,46 @@ 1.4 +// ZlibDecoder.h 1.5 + 1.6 +#ifndef __ZLIB_DECODER_H 1.7 +#define __ZLIB_DECODER_H 1.8 + 1.9 +#include "DeflateDecoder.h" 1.10 + 1.11 +namespace NCompress { 1.12 +namespace NZlib { 1.13 + 1.14 +const UInt32 ADLER_INIT_VAL = 1; 1.15 + 1.16 +class COutStreamWithAdler: 1.17 + public ISequentialOutStream, 1.18 + public CMyUnknownImp 1.19 +{ 1.20 + CMyComPtr<ISequentialOutStream> _stream; 1.21 + UInt32 _adler; 1.22 +public: 1.23 + MY_UNKNOWN_IMP 1.24 + STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize); 1.25 + void SetStream(ISequentialOutStream *stream) { _stream = stream; } 1.26 + void ReleaseStream() { _stream.Release(); } 1.27 + void Init() { _adler = ADLER_INIT_VAL; } 1.28 + UInt32 GetAdler() const { return _adler; } 1.29 +}; 1.30 + 1.31 +class CDecoder: 1.32 + public ICompressCoder, 1.33 + public CMyUnknownImp 1.34 +{ 1.35 + COutStreamWithAdler *AdlerSpec; 1.36 + CMyComPtr<ISequentialOutStream> AdlerStream; 1.37 + 1.38 + NCompress::NDeflate::NDecoder::CCOMCoder *DeflateDecoderSpec; 1.39 + CMyComPtr<ICompressCoder> DeflateDecoder; 1.40 +public: 1.41 + STDMETHOD(Code)(ISequentialInStream *inStream, ISequentialOutStream *outStream, 1.42 + const UInt64 *inSize, const UInt64 *outSize, ICompressProgressInfo *progress); 1.43 + 1.44 + MY_UNKNOWN_IMP 1.45 +}; 1.46 + 1.47 +}} 1.48 + 1.49 +#endif