/usr/share/gocode/src/github.com/chmduquesne/rollinghash/rollinghash.go is in golang-github-chmduquesne-rollinghash-dev 2.0.2+git20170321.9.043b8fd-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | /*
Package rollinghash implements rolling versions of some hashes
*/
package rollinghash
import "hash"
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)
}
// rollinghash.Hash extends hash.Hash by adding the method Roll. A
// rollinghash.Hash can be updated byte by byte, by specifying which byte
// enters the window.
type Hash interface {
hash.Hash
Roller
}
// rollinghash.Hash32 extends hash.Hash by adding the method Roll. A
// rollinghash.Hash32 can be updated byte by byte, by specifying which
// byte enters the window.
type Hash32 interface {
hash.Hash32
Roller
}
// rollinghash.Hash64 extends hash.Hash by adding the method Roll. A
// rollinghash.Hash64 can be updated byte by byte, by specifying which
// byte enters the window.
type Hash64 interface {
hash.Hash64
Roller
}
|