std/xxhash64: add new package

This commit is contained in:
Nigel Tao committed 2023-10-06 13:10:47 +11:00
1 parent e766e9ecde
commit 1304ee6265
10 files changed
+1488 -3

No files matched your search

+2 -1
View File
@@ -186,14 +186,15 @@ pub func hasher.checksum_u32() base.u32 {
var n : base.u32[..= 16]
var buf_u32 : base.u32
ret = this.length_modulo_u32
if (this.length_modulo_u32 >= 16) or this.length_overflows_u32 {
ret ~mod+= (this.v0 ~mod<< 1) | (this.v0 >> 31)
ret ~mod+= (this.v1 ~mod<< 7) | (this.v1 >> 25)
ret ~mod+= (this.v2 ~mod<< 12) | (this.v2 >> 20)
ret ~mod+= (this.v3 ~mod<< 18) | (this.v3 >> 14)
ret ~mod+= this.length_modulo_u32
} else {
ret ~mod+= XXH_PRIME32_5
ret ~mod+= this.length_modulo_u32
}
n = 16