Documentation
¶
Overview ¶
Package hash provides ...
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileDetector ¶
type FileDetector struct{}
FileDetector implements exact file duplicate detection.
func NewFileDetector ¶
func NewFileDetector() *FileDetector
NewFileDetector creates a new file-level hash detector.
func (*FileDetector) FindDuplOver ¶
func (f *FileDetector) FindDuplOver(ctx context.Context, data []*syntax.Node, threshold int) <-chan syntax.Match
FindDuplOver finds exact file duplicates using XXH3 hashing.
type FileDuplicate ¶
FileDuplicate represents a group of files with identical content.
func FindFileDuplicates ¶
func FindFileDuplicates(ctx context.Context, files []string, threshold int) []FileDuplicate
FindFileDuplicates finds exact file duplicates by hashing file contents. Files are hashed one at a time via io.Copy through XXH3 — file content is never held in memory. Only (hash, filename, size) is retained per file.
Click to show internal directories.
Click to hide internal directories.