diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-02 15:04:05 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-02 15:04:05 +0200 |
commit | 9387c79a1862e7572ffc59919c05cf1dc9aeeae5 (patch) | |
tree | d3e037378edacff40a242434ed1d3fe971051be3 /chunk.go | |
parent | 1dec2cdc84a6497c893d84485c6f94589f997215 (diff) | |
download | dna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.tar.gz dna-backup-9387c79a1862e7572ffc59919c05cf1dc9aeeae5.zip |
find similar chunks while matching stream
Diffstat (limited to 'chunk.go')
-rw-r--r-- | chunk.go | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -108,6 +108,10 @@ func (c *TempChunk) Len() int { return len(c.value) } +func (c *TempChunk) Bytes() []byte { + return c.value +} + func (c *TempChunk) AppendFrom(r io.Reader) { buff, err := io.ReadAll(r) if err != nil { @@ -129,6 +133,7 @@ func (c *DeltaChunk) Reader() ChunkReader { return &buff } +// TODO: Maybe return the size of the patch instead ? func (c *DeltaChunk) Len() int { return c.size } |