Documentation ¶
Overview ¶
Package hashutil provides alloc free alternatives for pkg/hash
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HashStringFnv64a ¶
Types ¶
type InlineFNV64a ¶
type InlineFNV64a uint64
InlineFNV64a is a alloc-free version of https://golang.org/pkg/hash/fnv/ copied from Xephon-K, which is copied from influxdb/models https://github.com/influxdata/influxdb/blob/master/models/inline_fnv.go
func NewInlineFNV64a ¶
func NewInlineFNV64a() InlineFNV64a
NewInlineFNV64a returns a new instance of InlineFNV64a.
func (*InlineFNV64a) Sum64 ¶
func (s *InlineFNV64a) Sum64() uint64
Sum64 returns the uint64 of the current resulting hash.
func (*InlineFNV64a) Write ¶
func (s *InlineFNV64a) Write(data []byte) (int, error)
Write adds data to the running hash.
func (*InlineFNV64a) WriteString ¶
func (s *InlineFNV64a) WriteString(str string) (int, error)
WriteString avoids a []byte(str) conversion BUT yield different result when string contains non ASCII characters
Click to show internal directories.
Click to hide internal directories.