s3: implement multipart downloads without using the S3 Manager

Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
Nicola Murino
2025-11-19 18:53:27 +01:00
parent 22c875c0a1
commit 4230da8e7d
5 changed files with 139 additions and 74 deletions

View File

@@ -1282,6 +1282,18 @@ func readFill(r io.Reader, buf []byte) (n int, err error) {
return n, err
}
func writeAtFull(w io.WriterAt, buf []byte, offset int64, count int) (int, error) {
written := 0
for written < count {
n, err := w.WriteAt(buf[written:count], offset+int64(written))
written += n
if err != nil {
return written, err
}
}
return written, nil
}
type bytesReaderWrapper struct {
*bytes.Reader
}