Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Archive/Lzh/LzhOutStreamWithCRC.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 source
1 // LzhOutStreamWithCRC.h3 #ifndef __LZHOUTSTREAMWITHCRC_H4 #define __LZHOUTSTREAMWITHCRC_H6 #include "LzhCRC.h"7 #include "../../../Common/MyCom.h"8 #include "../../IStream.h"10 namespace NArchive {11 namespace NLzh {13 class COutStreamWithCRC:14 public ISequentialOutStream,15 public CMyUnknownImp16 {17 public:18 MY_UNKNOWN_IMP20 STDMETHOD(Write)(const void *data, UInt32 size, UInt32 *processedSize);21 private:22 CCRC _crc;23 CMyComPtr<ISequentialOutStream> _stream;24 public:25 void Init(ISequentialOutStream *stream)26 {27 _stream = stream;28 _crc.Init();29 }30 void ReleaseStream() { _stream.Release(); }31 UInt32 GetCRC() const { return _crc.GetDigest(); }32 void InitCRC() { _crc.Init(); }34 };36 }}38 #endif