package cityhash102

import "github.com/ClickHouse/clickhouse-go/v2/lib/cityhash102"

* COPY from https://github.com/zentures/cityhash/

NOTE: The code is modified to be compatible with CityHash128 used in ClickHouse

Index

Functions

func CityHash64

func CityHash64(s []byte, length uint32) uint64

func CityHash64WithSeed

func CityHash64WithSeed(s []byte, length uint32, seed uint64) uint64

func CityHash64WithSeeds

func CityHash64WithSeeds(s []byte, length uint32, seed0, seed1 uint64) uint64

func New64

func New64() hash.Hash64

Types

type City64

type City64 struct {
	// contains filtered or unexported fields
}

func (*City64) BlockSize

func (this *City64) BlockSize() int

func (*City64) Reset

func (this *City64) Reset()

func (*City64) Size

func (this *City64) Size() int

func (*City64) Sum

func (this *City64) Sum(b []byte) []byte

func (*City64) Sum64

func (this *City64) Sum64() uint64

func (*City64) Write

func (this *City64) Write(s []byte) (n int, err error)

type Uint128

type Uint128 [2]uint64

func CityHash128

func CityHash128(s []byte, length uint32) (result Uint128)

func CityHash128WithSeed

func CityHash128WithSeed(s []byte, length uint32, seed Uint128) Uint128

func (Uint128) Bytes

func (this Uint128) Bytes() []byte

func (Uint128) Higher64

func (this Uint128) Higher64() uint64

func (Uint128) Lower64

func (this Uint128) Lower64() uint64

Source Files

city64.go cityhash.go doc.go

Version
v2.0.14
Published
May 4, 2022
Platform
js/wasm
Imports
2 packages
Last checked
20 minutes ago

Tools for package owners.