From 9387c79a1862e7572ffc59919c05cf1dc9aeeae5 Mon Sep 17 00:00:00 2001 From: n-peugnet Date: Thu, 2 Sep 2021 15:04:05 +0200 Subject: find similar chunks while matching stream --- chunk.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'chunk.go') diff --git a/chunk.go b/chunk.go index 3fc9057..abcdf1c 100644 --- a/chunk.go +++ b/chunk.go @@ -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 } -- cgit v1.2.3