func (weak *WeakChecksum) Roll(removedByte byte, newByte byte) {
	weak.a -= int(removedByte) - int(newByte)
	weak.b -= int(removedByte)*BLOCKSIZE - weak.a
}
Roll the checksum forward by one byte
package fs
import (
	"crypto/sha1"
	"fmt"
	"hash"
	"os"
	"path/filepath"
	"strings"
)
type WeakChecksum struct {
	a int
	b int
}
func (weak *WeakChecksum) Reset() {
	weak.a = 0
	weak.b = 0
}
func (weak *WeakChecksum) Write(buf []byte) {
	for i := 0; i < len(buf); i++ {
		b := int(buf[i])
		weak.a += b
		weak.b += (len(buf) - i) * b
	}
}
func (weak *WeakChecksum) Get() int {
	return weak.b<<16 | weak.a
}