package bloom

import 

// Hash is an interface abstracting the hashing algorithm used in bloom filters.
//
// Hash instances must be safe to use concurrently from multiple goroutines.
type Hash interface {
	// Returns the 64 bit hash of the value passed as argument.
	Sum64(value []byte) uint64

	// Compute hashes of individual values of primitive types.
	Sum64Uint8(value uint8) uint64
	Sum64Uint16(value uint16) uint64
	Sum64Uint32(value uint32) uint64
	Sum64Uint64(value uint64) uint64
	Sum64Uint128(value [16]byte) uint64

	// Compute hashes of the array of fixed size values passed as arguments,
	// returning the number of hashes written to the destination buffer.
	MultiSum64Uint8(dst []uint64, src []uint8) int
	MultiSum64Uint16(dst []uint64, src []uint16) int
	MultiSum64Uint32(dst []uint64, src []uint32) int
	MultiSum64Uint64(dst []uint64, src []uint64) int
	MultiSum64Uint128(dst []uint64, src [][16]byte) int
}

// XXH64 is an implementation of the Hash interface using the XXH64 algorithm.
type XXH64 struct{}

func (XXH64) ( []byte) uint64 {
	return xxhash.Sum64()
}

func (XXH64) ( uint8) uint64 {
	return xxhash.Sum64Uint8()
}

func (XXH64) ( uint16) uint64 {
	return xxhash.Sum64Uint16()
}

func (XXH64) ( uint32) uint64 {
	return xxhash.Sum64Uint32()
}

func (XXH64) ( uint64) uint64 {
	return xxhash.Sum64Uint64()
}

func (XXH64) ( [16]byte) uint64 {
	return xxhash.Sum64Uint128()
}

func (XXH64) ( []uint64,  []uint8) int {
	return xxhash.MultiSum64Uint8(, )
}

func (XXH64) ( []uint64,  []uint16) int {
	return xxhash.MultiSum64Uint16(, )
}

func (XXH64) ( []uint64,  []uint32) int {
	return xxhash.MultiSum64Uint32(, )
}

func (XXH64) ( []uint64,  []uint64) int {
	return xxhash.MultiSum64Uint64(, )
}

func (XXH64) ( []uint64,  [][16]byte) int {
	return xxhash.MultiSum64Uint128(, )
}

var (
	_ Hash = XXH64{}
)