fix rsyncable mode
This commit is contained in:
parent
8f86c29c06
commit
1026b9fa10
@ -1240,9 +1240,8 @@ size_t ZSTDMT_initCStream_internal(
|
|||||||
|
|
||||||
if (params.rsyncable) {
|
if (params.rsyncable) {
|
||||||
/* Aim for the targetsectionSize as the average job size. */
|
/* Aim for the targetsectionSize as the average job size. */
|
||||||
U32 const jobSizeMB = (U32)(mtctx->targetSectionSize >> 20);
|
U32 const jobSizeKB = (U32)(mtctx->targetSectionSize >> 10);
|
||||||
U32 const rsyncBits = ZSTD_highbit32(jobSizeMB) + 20;
|
U32 const rsyncBits = (assert(jobSizeKB >= 1), ZSTD_highbit32(jobSizeKB) + 10);
|
||||||
assert(jobSizeMB >= 1);
|
|
||||||
DEBUGLOG(4, "rsyncLog = %u", rsyncBits);
|
DEBUGLOG(4, "rsyncLog = %u", rsyncBits);
|
||||||
mtctx->rsync.hash = 0;
|
mtctx->rsync.hash = 0;
|
||||||
mtctx->rsync.hitMask = (1ULL << rsyncBits) - 1;
|
mtctx->rsync.hitMask = (1ULL << rsyncBits) - 1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user