vendor: Update everything
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4620
This commit is contained in:
16
vendor/github.com/chmduquesne/rollinghash/rollinghash.go
generated
vendored
16
vendor/github.com/chmduquesne/rollinghash/rollinghash.go
generated
vendored
@@ -7,11 +7,19 @@ package rollinghash
|
||||
|
||||
import "hash"
|
||||
|
||||
// DefaultWindowCap is the default capacity of the internal window of a
|
||||
// new Hash.
|
||||
const DefaultWindowCap = 64
|
||||
|
||||
// A Roller is a type that has the method Roll. Roll updates the hash of a
|
||||
// rolling window from just the entering byte. You MUST call Write()
|
||||
// BEFORE using this method and provide it with an initial window of size
|
||||
// at least 1 byte. You can then call this method for every new byte
|
||||
// entering the window. The byte leaving the window is automatically
|
||||
// computed from a copy of the window internally kept in the checksum.
|
||||
// This window is updated along with the internal state of the checksum
|
||||
// every time Roll() is called.
|
||||
type Roller interface {
|
||||
// Roll updates the hash of a rolling window from the entering byte.
|
||||
// A copy of the window is internally kept from the last Write().
|
||||
// This copy is updated along with the internal state of the checksum
|
||||
// in order to determine the new hash very quickly.
|
||||
Roll(b byte)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user