From 36da6832dce67da09d7bcee1a6ab2312e515cb0a Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Mon, 30 Aug 2021 19:22:03 +0200 Subject: make sketch parameters global vars --- repo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'repo.go') diff --git a/repo.go b/repo.go index a898f36..a505859 100644 --- a/repo.go +++ b/repo.go @@ -221,7 +221,7 @@ func hashChunks(chunks <-chan StoredChunk) (FingerprintMap, SketchMap) { io.Copy(hasher, c.Reader()) h := hasher.Sum64() fingerprints[h] = c.Id() - sketch, _ := SketchChunk(c, 32, 3, 4) + sketch, _ := SketchChunk(c, sketchWSize, sketchSfCount, sketchFCount) for _, s := range sketch { prev := sketches[s] if contains(prev, c.Id()) { @@ -246,7 +246,7 @@ func findSimilarChunk(chunk Chunk, sketches SketchMap) (*ChunkId, bool) { var similarChunks = make(map[ChunkId]int) var max int var similarChunk *ChunkId - sketch, _ := SketchChunk(chunk, 32, 3, 4) + sketch, _ := SketchChunk(chunk, sketchWSize, sketchSfCount, sketchFCount) for _, s := range sketch { chunkIds, exists := sketches[s] if !exists { -- cgit v1.2.3