Mercurial > vba-linux
view src/win32/7zip/7z/CPP/7zip/Archive/7z/7zFolderInStream.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 // 7z/FolderInStream.h3 #ifndef __7Z_FOLDERINSTREAM_H4 #define __7Z_FOLDERINSTREAM_H6 #include "7zItem.h"7 #include "7zHeader.h"9 #include "../IArchive.h"10 #include "../Common/InStreamWithCRC.h"11 #include "../../IStream.h"12 #include "../../ICoder.h"14 namespace NArchive {15 namespace N7z {17 class CFolderInStream:18 public ISequentialInStream,19 public ICompressGetSubStreamSize,20 public CMyUnknownImp21 {22 public:24 MY_UNKNOWN_IMP1(ICompressGetSubStreamSize)26 CFolderInStream();28 STDMETHOD(Read)(void *data, UInt32 size, UInt32 *processedSize);30 STDMETHOD(GetSubStreamSize)(UInt64 subStream, UInt64 *value);31 private:32 CSequentialInStreamWithCRC *_inStreamWithHashSpec;33 CMyComPtr<ISequentialInStream> _inStreamWithHash;34 CMyComPtr<IArchiveUpdateCallback> _updateCallback;36 bool _currentSizeIsDefined;37 UInt64 _currentSize;39 bool _fileIsOpen;40 UInt64 _filePos;42 const UInt32 *_fileIndices;43 UInt32 _numFiles;44 UInt32 _fileIndex;46 HRESULT OpenStream();47 HRESULT CloseStream();48 void AddDigest();49 public:50 void Init(IArchiveUpdateCallback *updateCallback,51 const UInt32 *fileIndices, UInt32 numFiles);52 CRecordVector<bool> Processed;53 CRecordVector<UInt32> CRCs;54 CRecordVector<UInt64> Sizes;55 UInt64 GetFullSize() const56 {57 UInt64 size = 0;58 for (int i = 0; i < Sizes.Size(); i++)59 size += Sizes[i];60 return size;61 }62 };64 }}66 #endif