Mercurial > vba-linux
comparison 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 |
comparison
equal
deleted
inserted
replaced
0:8ced16adf2e1 | 1:f9f4f1b99eed |
---|---|
1 // LzhOutStreamWithCRC.h | |
2 | |
3 #ifndef __LZHOUTSTREAMWITHCRC_H | |
4 #define __LZHOUTSTREAMWITHCRC_H | |
5 | |
6 #include "LzhCRC.h" | |
7 #include "../../../Common/MyCom.h" | |
8 #include "../../IStream.h" | |
9 | |
10 namespace NArchive { | |
11 namespace NLzh { | |
12 | |
13 class COutStreamWithCRC: | |
14 public ISequentialOutStream, | |
15 public CMyUnknownImp | |
16 { | |
17 public: | |
18 MY_UNKNOWN_IMP | |
19 | |
20 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(); } | |
33 | |
34 }; | |
35 | |
36 }} | |
37 | |
38 #endif |