7zIn.h revision baa3858d3f5d128a5c8466b700098109edcad5f2
1baa3858d3f5d128a5c8466b700098109edcad5f2repo sync// 7zIn.h
2baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
3baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#ifndef __7Z_IN_H
4baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#define __7Z_IN_H
5baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
6baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../../Common/MyCom.h"
7baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
8baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../IPassword.h"
9baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../IStream.h"
10baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
11baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../Common/CreateCoder.h"
12baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "../../Common/InBuffer.h"
13baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
14baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#include "7zItem.h"
15baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
16baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace NArchive {
17baa3858d3f5d128a5c8466b700098109edcad5f2repo syncnamespace N7z {
18baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
19baa3858d3f5d128a5c8466b700098109edcad5f2repo syncstruct CInArchiveInfo
20baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
21baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CArchiveVersion Version;
22baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 StartPosition;
23baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 StartPositionAfterHeader;
24baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 DataStartPosition;
25baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 DataStartPosition2;
26baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<UInt64> FileInfoPopIDs;
27baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void Clear()
28baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
29baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FileInfoPopIDs.Clear();
30baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
31baa3858d3f5d128a5c8466b700098109edcad5f2repo sync};
32baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
33baa3858d3f5d128a5c8466b700098109edcad5f2repo syncstruct CArchiveDatabaseEx: public CArchiveDatabase
34baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
35baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CInArchiveInfo ArchiveInfo;
36baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<UInt64> PackStreamStartPositions;
37baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<CNum> FolderStartPackStreamIndex;
38baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<CNum> FolderStartFileIndex;
39baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CRecordVector<CNum> FileIndexToFolderIndexMap;
40baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
41baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 HeadersSize;
42baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 PhySize;
43baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
44baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void Clear()
45baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
46baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    CArchiveDatabase::Clear();
47baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    ArchiveInfo.Clear();
48baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    PackStreamStartPositions.Clear();
49baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FolderStartPackStreamIndex.Clear();
50baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FolderStartFileIndex.Clear();
51baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FileIndexToFolderIndexMap.Clear();
52baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
53baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    HeadersSize = 0;
54baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    PhySize = 0;
55baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
56baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
57baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void FillFolderStartPackStream();
58baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void FillStartPos();
59baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void FillFolderStartFileIndex();
60baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
61baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void Fill()
62baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
63baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FillFolderStartPackStream();
64baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FillStartPos();
65baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    FillFolderStartFileIndex();
66baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
67baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
68baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 GetFolderStreamPos(int folderIndex, int indexInFolder) const
69baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
70baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    return ArchiveInfo.DataStartPosition +
71baa3858d3f5d128a5c8466b700098109edcad5f2repo sync        PackStreamStartPositions[FolderStartPackStreamIndex[folderIndex] + indexInFolder];
72baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
73baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
74baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 GetFolderFullPackSize(int folderIndex) const
75baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
76baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    CNum packStreamIndex = FolderStartPackStreamIndex[folderIndex];
77baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    const CFolder &folder = Folders[folderIndex];
78baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    UInt64 size = 0;
79baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    for (int i = 0; i < folder.PackStreams.Size(); i++)
80baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      size += PackSizes[packStreamIndex + i];
81baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    return size;
82baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
83baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
84baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 GetFolderPackStreamSize(int folderIndex, int streamIndex) const
85baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
86baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    return PackSizes[FolderStartPackStreamIndex[folderIndex] + streamIndex];
87baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
88baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
89baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 GetFilePackSize(CNum fileIndex) const
90baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
91baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    CNum folderIndex = FileIndexToFolderIndexMap[fileIndex];
92baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    if (folderIndex != kNumNoIndex)
93baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      if (FolderStartFileIndex[folderIndex] == fileIndex)
94baa3858d3f5d128a5c8466b700098109edcad5f2repo sync        return GetFolderFullPackSize(folderIndex);
95baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    return 0;
96baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
97baa3858d3f5d128a5c8466b700098109edcad5f2repo sync};
98baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
99baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass CInByte2
100baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
101baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  const Byte *_buffer;
102baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  size_t _size;
103baa3858d3f5d128a5c8466b700098109edcad5f2repo syncpublic:
104baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  size_t _pos;
105baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void Init(const Byte *buffer, size_t size)
106baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
107baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _buffer = buffer;
108baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _size = size;
109baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _pos = 0;
110baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
111baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  Byte ReadByte();
112baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadBytes(Byte *data, size_t size);
113baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void SkipData(UInt64 size);
114baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void SkipData();
115baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 ReadNumber();
116baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CNum ReadNum();
117baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 ReadUInt32();
118baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 ReadUInt64();
119baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadString(UString &s);
120baa3858d3f5d128a5c8466b700098109edcad5f2repo sync};
121baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
122baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass CStreamSwitch;
123baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
124baa3858d3f5d128a5c8466b700098109edcad5f2repo syncconst UInt32 kHeaderSize = 32;
125baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
126baa3858d3f5d128a5c8466b700098109edcad5f2repo syncclass CInArchive
127baa3858d3f5d128a5c8466b700098109edcad5f2repo sync{
128baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  friend class CStreamSwitch;
129baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
130baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CMyComPtr<IInStream> _stream;
131baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
132baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CObjectVector<CInByte2> _inByteVector;
133baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CInByte2 *_inByteBack;
134baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
135baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 _arhiveBeginStreamPosition;
136baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
137baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  Byte _header[kHeaderSize];
138baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
139baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 HeadersSize;
140baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
141baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void AddByteStream(const Byte *buffer, size_t size)
142baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
143baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _inByteVector.Add(CInByte2());
144baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _inByteBack = &_inByteVector.Back();
145baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _inByteBack->Init(buffer, size);
146baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
147baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
148baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void DeleteByteStream()
149baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  {
150baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    _inByteVector.DeleteBack();
151baa3858d3f5d128a5c8466b700098109edcad5f2repo sync    if (!_inByteVector.IsEmpty())
152baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      _inByteBack = &_inByteVector.Back();
153baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  }
154baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
155baa3858d3f5d128a5c8466b700098109edcad5f2repo syncprivate:
156baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT FindAndReadSignature(IInStream *stream, const UInt64 *searchHeaderSizeLimit);
157baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
158baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadBytes(Byte *data, size_t size) { _inByteBack->ReadBytes(data, size); }
159baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  Byte ReadByte() { return _inByteBack->ReadByte(); }
160baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 ReadNumber() { return _inByteBack->ReadNumber(); }
161baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  CNum ReadNum() { return _inByteBack->ReadNum(); }
162baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 ReadID() { return _inByteBack->ReadNumber(); }
163baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt32 ReadUInt32() { return _inByteBack->ReadUInt32(); }
164baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  UInt64 ReadUInt64() { return _inByteBack->ReadUInt64(); }
165baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void SkipData(UInt64 size) { _inByteBack->SkipData(size); }
166baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void SkipData() { _inByteBack->SkipData(); }
167baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void WaitAttribute(UInt64 attribute);
168baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
169baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadArchiveProperties(CInArchiveInfo &archiveInfo);
170baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void GetNextFolderItem(CFolder &itemInfo);
171baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadHashDigests(int numItems,
172baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CBoolVector &digestsDefined, CRecordVector<UInt32> &digests);
173baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
174baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadPackInfo(
175baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      UInt64 &dataOffset,
176baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt64> &packSizes,
177baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CBoolVector &packCRCsDefined,
178baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt32> &packCRCs);
179baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
180baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadUnpackInfo(
181baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      const CObjectVector<CByteBuffer> *dataVector,
182baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CObjectVector<CFolder> &folders);
183baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
184baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadSubStreamsInfo(
185baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      const CObjectVector<CFolder> &folders,
186baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<CNum> &numUnpackStreamsInFolders,
187baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt64> &unpackSizes,
188baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CBoolVector &digestsDefined,
189baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt32> &digests);
190baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
191baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadStreamsInfo(
192baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      const CObjectVector<CByteBuffer> *dataVector,
193baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      UInt64 &dataOffset,
194baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt64> &packSizes,
195baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CBoolVector &packCRCsDefined,
196baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt32> &packCRCs,
197baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CObjectVector<CFolder> &folders,
198baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<CNum> &numUnpackStreamsInFolders,
199baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt64> &unpackSizes,
200baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CBoolVector &digestsDefined,
201baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CRecordVector<UInt32> &digests);
202baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
203baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
204baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadBoolVector(int numItems, CBoolVector &v);
205baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadBoolVector2(int numItems, CBoolVector &v);
206baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void ReadUInt64DefVector(const CObjectVector<CByteBuffer> &dataVector,
207baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CUInt64DefVector &v, int numFiles);
208baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT ReadAndDecodePackedStreams(
209baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      DECL_EXTERNAL_CODECS_LOC_VARS
210baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      UInt64 baseOffset, UInt64 &dataOffset,
211baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CObjectVector<CByteBuffer> &dataVector
212baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #ifndef _NO_CRYPTO
213baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      , ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
214baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #endif
215baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      );
216baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT ReadHeader(
217baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      DECL_EXTERNAL_CODECS_LOC_VARS
218baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CArchiveDatabaseEx &db
219baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #ifndef _NO_CRYPTO
220baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
221baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #endif
222baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      );
223baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT ReadDatabase2(
224baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      DECL_EXTERNAL_CODECS_LOC_VARS
225baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CArchiveDatabaseEx &db
226baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #ifndef _NO_CRYPTO
227baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
228baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #endif
229baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      );
230baa3858d3f5d128a5c8466b700098109edcad5f2repo syncpublic:
231baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT Open(IInStream *stream, const UInt64 *searchHeaderSizeLimit); // S_FALSE means is not archive
232baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  void Close();
233baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
234baa3858d3f5d128a5c8466b700098109edcad5f2repo sync  HRESULT ReadDatabase(
235baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      DECL_EXTERNAL_CODECS_LOC_VARS
236baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      CArchiveDatabaseEx &db
237baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #ifndef _NO_CRYPTO
238baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      ,ICryptoGetTextPassword *getTextPassword, bool &passwordIsDefined
239baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      #endif
240baa3858d3f5d128a5c8466b700098109edcad5f2repo sync      );
241baa3858d3f5d128a5c8466b700098109edcad5f2repo sync};
242baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
243baa3858d3f5d128a5c8466b700098109edcad5f2repo sync}}
244baa3858d3f5d128a5c8466b700098109edcad5f2repo sync
245baa3858d3f5d128a5c8466b700098109edcad5f2repo sync#endif
246