QcowHandler.cpp (p7zip_15.14.1_src_all) | : | QcowHandler.cpp (p7zip_16.02_src_all) | ||
---|---|---|---|---|
skipping to change at line 462 | skipping to change at line 462 | |||
const UInt64 offsetMask = _compressedFlag - 1; | const UInt64 offsetMask = _compressedFlag - 1; | |||
for (UInt32 i = 0; i < l1Size; i++) | for (UInt32 i = 0; i < l1Size; i++) | |||
{ | { | |||
if (openCallback) | if (openCallback) | |||
{ | { | |||
UInt64 numBytes = (UInt64)i << (_numMidBits + 3); | UInt64 numBytes = (UInt64)i << (_numMidBits + 3); | |||
RINOK(openCallback->SetCompleted(NULL, &numBytes)); | RINOK(openCallback->SetCompleted(NULL, &numBytes)); | |||
} | } | |||
UInt64 v = Get64((const Byte *)table + (size_t)i * 8); | CByteBuffer &buf2 = _tables.AddNew(); | |||
v &= offsetMask; | ||||
CByteBuffer &buf = _tables.AddNew(); | { | |||
if (v == 0) | UInt64 v = Get64((const Byte *)table + (size_t)i * 8); | |||
continue; | v &= offsetMask; | |||
if (v == 0) | ||||
buf.Alloc((size_t)1 << (_numMidBits + 3)); | continue; | |||
RINOK(stream->Seek(v, STREAM_SEEK_SET, NULL)); | ||||
RINOK(ReadStream_FALSE(stream, buf, clusterSize)); | buf2.Alloc((size_t)1 << (_numMidBits + 3)); | |||
UInt64 end = v + clusterSize; | RINOK(stream->Seek(v, STREAM_SEEK_SET, NULL)); | |||
if (_phySize < end) | RINOK(ReadStream_FALSE(stream, buf2, clusterSize)); | |||
_phySize = end; | ||||
const UInt64 end = v + clusterSize; | ||||
if (_phySize < end) | ||||
_phySize = end; | ||||
} | ||||
for (size_t k = 0; k < clusterSize; k += 8) | for (size_t k = 0; k < clusterSize; k += 8) | |||
{ | { | |||
UInt64 v = Get64((const Byte *)buf + (size_t)k); | const UInt64 v = Get64((const Byte *)buf2 + (size_t)k); | |||
if (v == 0) | if (v == 0) | |||
continue; | continue; | |||
UInt64 offset = v & offsetMask; | UInt64 offset = v & offsetMask; | |||
size_t dataSize = clusterSize; | size_t dataSize = clusterSize; | |||
if ((v & _compressedFlag) != 0) | if ((v & _compressedFlag) != 0) | |||
{ | { | |||
if (_version <= 1) | if (_version <= 1) | |||
{ | { | |||
unsigned numOffsetBits = (63 - _clusterBits); | unsigned numOffsetBits = (63 - _clusterBits); | |||
End of changes. 2 change blocks. | ||||
13 lines changed or deleted | 17 lines changed or added |