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

Method GetV

Libraries/unrar/rawread.cpp:115–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

113
114
115uint64 RawRead::GetV()
116{
117 uint64 Result=0;
118 // Need to check Shift<64, because for shift greater than or equal to
119 // the width of the promoted left operand, the behavior is undefined.
120 for (uint Shift=0;ReadPos<DataSize && Shift<64;Shift+=7)
121 {
122 byte CurByte=Data[ReadPos++];
123 Result+=uint64(CurByte & 0x7f)<<Shift;
124 if ((CurByte & 0x80)==0)
125 return Result; // Decoded successfully.
126 }
127 return 0; // Out of buffer border.
128}
129
130
131// Return a number of bytes in current variable length integer.

Callers 4

ReadHeader50Method · 0.80
ProcessExtra50Method · 0.80
ReadRawMethod · 0.80
ReadNextMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected