checker: reuse bufio reader

This commit is contained in:
Michael Eischer
2021-08-22 14:38:27 +02:00
parent 34ebafb8b6
commit 930a00ad54
2 changed files with 7 additions and 10 deletions

View File

@@ -767,6 +767,7 @@ func StreamPack(ctx context.Context, beLoad BackendLoadFn, key *crypto.Key, pack
if bufferSize > MaxStreamBufferSize {
bufferSize = MaxStreamBufferSize
}
// create reader here to allow reusing the buffered reader from checker.checkData
bufRd := bufio.NewReaderSize(rd, bufferSize)
currentBlobEnd := dataStart
var buf []byte