Documentation ¶
Overview ¶
Package dedup implements a utility to determine if a record has not been seen before (whether it's unique).
Index ¶
Constants ¶
View Source
const HashSize = sha512.Size384
HashSize is the size of hash used to determine uniqueness in Deduper.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Deduper ¶
type Deduper struct {
// contains filtered or unexported fields
}
Deduper determines if a data record has been seen before by checking its size-limited cache of hashes.
func New ¶
New returns a new Deduper with the given cache size (in bytes). maxSize must be at least HashSize/2.
func (*Deduper) Duplicates ¶
Duplicates returns the number of duplicate records seen so far.
Click to show internal directories.
Click to hide internal directories.