@@ -370,32 +370,30 @@ struct Chunker(R)
370
370
}
371
371
372
372
auto add = state.count;
373
- auto window = state.hash.window;
374
- auto wpos = state.hash.wpos;
375
- auto digest = state.hash.digest;
373
+ auto hash = state.hash;
376
374
foreach (_, b; buf[state.bpos .. state.bmax])
377
375
{
378
376
// slide(b)
379
- auto out_ = window[wpos];
380
- window[wpos] = b;
381
- digest ^= ulong (tabout[out_].value);
382
- wpos++ ;
383
- if (wpos >= windowSize)
384
- wpos = 0 ;
377
+ auto out_ = hash. window[hash. wpos];
378
+ hash. window[hash. wpos] = b;
379
+ hash. digest ^= ulong (tabout[out_].value);
380
+ hash. wpos++ ;
381
+ if (hash. wpos >= windowSize)
382
+ hash. wpos = 0 ;
385
383
386
384
// updateDigest
387
- auto index = cast (ubyte )(digest >> polShift);
388
- digest <<= 8 ;
389
- digest |= ulong (b);
385
+ auto index = cast (ubyte )(hash. digest >> polShift);
386
+ hash. digest <<= 8 ;
387
+ hash. digest |= ulong (b);
390
388
391
- digest ^= ulong (tabmod[index].value);
389
+ hash. digest ^= ulong (tabmod[index].value);
392
390
// end manual inline
393
391
394
392
add++ ;
395
393
if (add < minSize)
396
394
continue ;
397
395
398
- if ((digest&config.splitmask) == 0 || add >= maxSize)
396
+ if ((hash. digest&config.splitmask) == 0 || add >= maxSize)
399
397
{
400
398
auto i = add - state.count - 1 ;
401
399
data ~= state.buf[state.bpos .. state.bpos+ uint (i)+ 1 ];
@@ -408,7 +406,7 @@ struct Chunker(R)
408
406
(
409
407
/* Start: */ state.start,
410
408
/* Length:*/ state.count,
411
- /* Cut: */ digest,
409
+ /* Cut: */ hash. digest,
412
410
/* Data: */ data,
413
411
);
414
412
@@ -417,9 +415,7 @@ struct Chunker(R)
417
415
return chunk;
418
416
}
419
417
}
420
- state.hash.window = window;
421
- state.hash.wpos = wpos;
422
- state.hash.digest = digest;
418
+ state.hash = hash;
423
419
424
420
auto steps = state.bmax - state.bpos;
425
421
if (steps > 0 )
0 commit comments