Home | History | Annotate | Download | only in src

Lines Matching defs:Hash

29 // Definitions common to all hash window sizes.
65 // Here's the heart of the hash algorithm. Start with a partial_hash value of
67 // hashed. The result will be the hash value for the entire data window. The
68 // Hash() function, below, does exactly this, albeit with some refinements.
74 // Use this function to start computing a new hash value based on the first
108 // instance of this type to use UpdateHash(), but Hash() does not depend on
117 // Compute a hash of the window "ptr[0, window_size - 1]".
118 static uint32_t Hash(const char* ptr) {
126 // Update a hash by removing the oldest byte and adding a new byte.
128 // UpdateHash takes the hash value of buffer[0] ... buffer[window_size -1]
131 // It quickly computes the hash value of buffer[1] ... buffer[window_size]
132 // without having to run Hash() on the entire window.
135 // (which runs in time independent of window_size) instead of Hash().
136 // Each time window_size doubles, the time to execute Hash() also doubles,
147 // Given a full hash value for buffer[0] ... buffer[window_size -1], plus the
148 // value of the first byte buffer[0], this function returns a *partial* hash
164 // the hash value of buffer[0] ... buffer[window_size - 1]
166 // == the hash value of buffer[1] ... buffer[window_size - 1]
209 // If you take a hash value fp representing the hash of
212 // a partial hash value for
217 // partial hash value to arrive quickly at the hash value for a window that