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:
“Look, were all the same; a man is a fourteen-room housein the bedroom hes asleep with his intelligent wife, in the living-room hes rolling around with some bareass girl, in the library hes paying his taxes, in the yard hes raising tomatoes, and in the cellar hes making a bomb to blow it all up.”
—Arthur Miller (b. 1915)