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

+3
View File
@@ -27,6 +27,7 @@ import (
"strings"
"github.com/pierrec/xxHash/xxHash32"
"github.com/pierrec/xxHash/xxHash64"
)
var (
@@ -76,6 +77,8 @@ func do(r io.Reader) error {
h = crc32.NewIEEE()
case "xxhash32":
h = xxHash32.New(0)
case "xxhash64":
h = xxHash64.New(0)
default:
return fmt.Errorf("unknown algorithm %q", *algorithm)
}