Pārlūkot izejas kodu

formula is only approximately correct

the movement of the start of the hashing window stops at (file_size - window_size), thus THAT would be the factor in that formula, not just file_size.

for medium and big files, window_size is much smaller than file_size, so guess we can just say "approximately" for the general case.
Thomas Waldmann 3 gadi atpakaļ
vecāks
revīzija
94e93ba7e6
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      docs/internals/data-structures.rst

+ 1 - 1
docs/internals/data-structures.rst

@@ -633,7 +633,7 @@ This results in a high chance that a single cluster of changes to a file will on
 result in 1-2 new chunks, aiding deduplication.
 
 Using normal hash functions this would be extremely slow,
-requiring hashing ``window size * file size`` bytes.
+requiring hashing approximately ``window size * file size`` bytes.
 A rolling hash is used instead, which allows to add a new input byte and
 compute a new hash as well as *remove* a previously added input byte
 from the computed hash. This makes the cost of computing a hash for each