We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 13a1fee commit 443b0b8Copy full SHA for 443b0b8
src/io/CompressedInputStream.cpp
@@ -351,11 +351,14 @@ void CompressedInputStream::readHeader()
351
const int crcSize = bsVersion <= 5 ? 16 : 24;
352
const uint32 cksum1 = uint32(_ibs->readBits(crcSize));
353
354
- uint32 seed = (bsVersion <= 5 ? 1 : 0x01030507) * uint32(bsVersion);
+ uint32 seed = (bsVersion >= 6 ? 0x01030507 : 1) * uint32(bsVersion);
355
const uint32 HASH = 0x1E35A7BD;
356
357
uint32 cksum2 = HASH * seed;
358
- cksum2 ^= (HASH * uint32(~ckSize));
+
359
+ if (bsVersion >= 6)
360
+ cksum2 ^= (HASH * uint32(~ckSize));
361
362
cksum2 ^= (HASH * uint32(~_entropyType));
363
cksum2 ^= (HASH * uint32((~_transformType) >> 32));
364
cksum2 ^= (HASH * uint32(~_transformType));
0 commit comments