package rollsum
import "go4.org/rollsum"
Package rollsum implements rolling checksums similar to apenwarr's bup, which is similar to librsync.
The bup project is at https://github.com/apenwarr/bup and its splitting in particular is at https://github.com/apenwarr/bup/blob/master/lib/bup/bupsplit.c
Index ¶
Types ¶
type RollSum ¶
type RollSum struct {
// contains filtered or unexported fields
}
func New ¶
func New() *RollSum
func (*RollSum) Bits ¶
func (*RollSum) Digest ¶
func (*RollSum) OnSplit ¶
OnSplit reports whether at least 13 consecutive trailing bits of the current checksum are set the same way.
func (*RollSum) OnSplitWithBits ¶
OnSplitWithBits reports whether at least n consecutive trailing bits of the current checksum are set the same way.
func (*RollSum) Roll ¶
Roll adds ch to the rolling sum.
Source Files ¶
rollsum.go
- Version
- v0.0.0-20230225012048-214862532bf5 (latest)
- Published
- Feb 25, 2023
- Platform
- linux/amd64
- Imports
- 1 packages
- Last checked
- 1 month ago –
Tools for package owners.