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

Method ReadNext

Libraries/unrar/qopen.cpp:285–300  ·  view source on GitHub ↗

Read next cached header.

Source from the content-addressed store, hash-verified

283
284// Read next cached header.
285bool QuickOpen::ReadNext()
286{
287 RawRead Raw(NULL);
288 if (!ReadRaw(Raw)) // Read internal quick open header preceding stored block.
289 return false;
290 uint Flags=(uint)Raw.GetV();
291 uint64 Offset=Raw.GetV();
292 size_t HeaderSize=(size_t)Raw.GetV();
293 if (HeaderSize>MAX_HEADER_SIZE_RAR5)
294 return false;
295 LastReadHeader.Alloc(HeaderSize);
296 Raw.GetB(&LastReadHeader[0],HeaderSize);
297 // Calculate the absolute position as offset from quick open service header.
298 LastReadHeaderPos=QOHeaderPos-Offset;
299 return true;
300}

Callers

nothing calls this directly

Calls 3

GetVMethod · 0.80
AllocMethod · 0.80
GetBMethod · 0.80

Tested by

no test coverage detected