aboutsummaryrefslogtreecommitdiff
path: root/chunk.go
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2021-08-27 18:38:07 +0200
committern-peugnet <n.peugnet@free.fr>2021-08-27 18:38:16 +0200
commit129a86b3a6780b7aee5a7469cc5adeaf2ea6c20f (patch)
treeab8423f6885c380b2bb4d807313428003d8d5e37 /chunk.go
parent78251f11c91b2504edfc02b760ef53bd352b856c (diff)
downloaddna-backup-129a86b3a6780b7aee5a7469cc5adeaf2ea6c20f.tar.gz
dna-backup-129a86b3a6780b7aee5a7469cc5adeaf2ea6c20f.zip
add findSimilarChunks method to test sketches
Still missing a real test...
Diffstat (limited to 'chunk.go')
-rw-r--r--chunk.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/chunk.go b/chunk.go
index 0746fde..20dfe58 100644
--- a/chunk.go
+++ b/chunk.go
@@ -45,9 +45,11 @@ func (c *Chunk) Read(buff []byte) (int, error) {
func (c *Chunk) Reader() (ChunkReader, error) {
if c.Value != nil {
+ log.Printf("Chunk %d: Reading from in-memory value\n", c.Id)
return bytes.NewReader(c.Value), nil
}
if c.Id != nil {
+ log.Printf("Chunk %d: Reading from file\n", c.Id)
return c.Id.Reader(c.Repo.path), nil
}
return nil, &ChunkError{"Uninitialized chunk"}