A rolling hash is a hash function where the input is hashed in a window that moves through the input.
A few hash functions allow a rolling hash to be computed very quickly—the new hash value is rapidly calculated given only the old hash value, the old value removed from the window, and the new value added to the window—similar to the way a moving average function can be computed much more quickly than other low-pass filters.
One of the main applications is the Rabin-Karp string search algorithm, which uses the rolling hash described below.
Another popular application is rsync program which uses a checksum based on Mark Adler's adler-32 as its rolling hash.
At best, rolling hash values are pairwise independent or strongly universal. They cannot be 3-wise independent, for example.
Read more about Rolling Hash: Rabin-Karp Rolling Hash, Content Based Slicing Using Rabin-Karp Hash, Cyclic Polynomial, Computational Complexity, Software, See Also, External Links
Famous quotes containing the word rolling:
“I caught this morning mornings minion, king-
dom of daylights dauphin, dapple-dawn-drawn Falcon, in his riding
Of the rolling level underneath him steady air, and striding
High there, how he rung upon the rein of a wimpling wing
In his ecstasy!”
—Gerard Manley Hopkins (18441889)