From f9f6124558c6d5914435e666d4f443b5d4d4888b Mon Sep 17 00:00:00 2001
From: Alexander Neumann <alexander@bumpern.de>
Date: Mon, 20 Jul 2020 21:20:57 +0200
Subject: [PATCH] Update chunker

---
 changelog/unreleased/pull-2576 | 4 +++-
 go.mod                         | 2 +-
 go.sum                         | 4 ++--
 3 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/changelog/unreleased/pull-2576 b/changelog/unreleased/pull-2576
index 1d2fb9511..1a659df4b 100644
--- a/changelog/unreleased/pull-2576
+++ b/changelog/unreleased/pull-2576
@@ -1,7 +1,9 @@
 Enhancement: Improve the chunking algorithm
 
 We've updated the chunker library responsible for splitting files into smaller
-blocks. It should improve the chunking throughput by 5-10% depending on the
+blocks. It should improve the chunking throughput by 5-15% depending on the
 CPU.
 
 https://github.com/restic/restic/pull/2576
+https://github.com/restic/restic/pull/2845
+https://github.com/restic/restic/issues/2820
diff --git a/go.mod b/go.mod
index 20bf25234..808e97349 100644
--- a/go.mod
+++ b/go.mod
@@ -27,7 +27,7 @@ require (
 	github.com/pkg/profile v1.3.0
 	github.com/pkg/sftp v1.10.0
 	github.com/pkg/xattr v0.4.1
-	github.com/restic/chunker v0.3.0
+	github.com/restic/chunker v0.4.0
 	github.com/satori/go.uuid v1.2.0 // indirect
 	github.com/smartystreets/assertions v0.0.0-20190401211740-f487f9de1cd3 // indirect
 	github.com/spf13/cobra v0.0.3
diff --git a/go.sum b/go.sum
index 1ceb1360b..0c2944bf7 100644
--- a/go.sum
+++ b/go.sum
@@ -134,8 +134,8 @@ github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y8
 github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
 github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
 github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
-github.com/restic/chunker v0.3.0 h1:8OGNG5ALPTmHTdfuNkwqHqbzifrIc3MeL8CL7q9BY34=
-github.com/restic/chunker v0.3.0/go.mod h1:VdjruEj+7BU1ZZTW8Qqi1exxRx2Omf2JH0NsUEkQ29s=
+github.com/restic/chunker v0.4.0 h1:YUPYCUn70MYP7VO4yllypp2SjmsRhRJaad3xKu1QFRw=
+github.com/restic/chunker v0.4.0/go.mod h1:z0cH2BejpW636LXw0R/BGyv+Ey8+m9QGiOanDHItzyw=
 github.com/russross/blackfriday v1.5.2 h1:HyvC0ARfnZBqnXwABFeSZHpKvJHJJfPz81GNueLj0oo=
 github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
 github.com/satori/go.uuid v1.2.0 h1:0uYX9dsZ2yD7q2RtLRtPSdGDWzjeM3TbMJP9utgA0ww=