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

Method ReadEndOfBlock

Libraries/unrar/unpack30.cpp:257–285  ·  view source on GitHub ↗

Return 'false' to quit unpacking the current file or 'true' to continue.

Source from the content-addressed store, hash-verified

255
256// Return 'false' to quit unpacking the current file or 'true' to continue.
257bool Unpack::ReadEndOfBlock()
258{
259 uint BitField=Inp.getbits();
260 bool NewTable,NewFile=false;
261
262 // "1" - no new file, new table just here.
263 // "00" - new file, no new table.
264 // "01" - new file, new table (in beginning of next file).
265
266 if ((BitField & 0x8000)!=0)
267 {
268 NewTable=true;
269 Inp.addbits(1);
270 }
271 else
272 {
273 NewFile=true;
274 NewTable=(BitField & 0x4000)!=0;
275 Inp.addbits(2);
276 }
277 TablesRead3=!NewTable;
278
279 // Quit immediately if "new file" flag is set. If "new table" flag
280 // is present, we'll read the table in beginning of next file
281 // based on 'TablesRead3' 'false' value.
282 if (NewFile)
283 return false;
284 return ReadTables30(); // Quit only if we failed to read tables.
285}
286
287
288bool Unpack::ReadVMCode()

Callers

nothing calls this directly

Calls 2

getbitsMethod · 0.80
addbitsMethod · 0.80

Tested by

no test coverage detected