Fix checksum bench

This commit is contained in:
世界 2025-03-12 16:24:42 +08:00
parent 7f3343169a
commit 57aba1a5c4
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
4 changed files with 7 additions and 5 deletions

View file

@ -38,3 +38,8 @@ func Combine(a, b uint16) uint16 {
v := uint32(a) + uint32(b)
return uint16(v + v>>16)
}
func ChecksumDefault(buf []byte, initial uint16) uint16 {
s, _ := calculateChecksum(buf, false, initial)
return s
}