mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-18 00:32:11 +01:00
std/xxhash64: add new package
This commit is contained in:
1 parent
e766e9ecde
commit
1304ee6265
10 files changed
+1488
-3
No files matched your search
@@ -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)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user