MCPcopy Create free account
hub / github.com/abbeycode/UnrarKit / UnpInitData

Method UnpInitData

Libraries/unrar/unpack.cpp:193–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

191
192
193void Unpack::UnpInitData(bool Solid)
194{
195 if (!Solid)
196 {
197 memset(OldDist,0,sizeof(OldDist));
198 OldDistPtr=0;
199 LastDist=LastLength=0;
200// memset(Window,0,MaxWinSize);
201 memset(&BlockTables,0,sizeof(BlockTables));
202 UnpPtr=WrPtr=0;
203 WriteBorder=Min(MaxWinSize,UNPACK_MAX_WRITE)&MaxWinMask;
204 }
205 // Filters never share several solid files, so we can safely reset them
206 // even in solid archive.
207 InitFilters();
208
209 Inp.InitBitInput();
210 WrittenFileSize=0;
211 ReadTop=0;
212 ReadBorder=0;
213
214 memset(&BlockHeader,0,sizeof(BlockHeader));
215 BlockHeader.BlockSize=-1; // '-1' means not defined yet.
216#ifndef SFX_MODULE
217 UnpInitData20(Solid);
218#endif
219 UnpInitData30(Solid);
220 UnpInitData50(Solid);
221}
222
223
224// LengthTable contains the length in bits for every element of alphabet.

Callers

nothing calls this directly

Calls 1

InitBitInputMethod · 0.80

Tested by

no test coverage detected