mirror of
https://github.com/restic/restic.git
synced 2025-12-03 21:51:47 +00:00
repository: implement pack compression
This commit is contained in:
@@ -117,7 +117,7 @@ func (r *fileRestorer) restoreFiles(ctx context.Context) error {
|
||||
err := r.forEachBlob(fileBlobs, func(packID restic.ID, blob restic.Blob) {
|
||||
if largeFile {
|
||||
packsMap[packID] = append(packsMap[packID], fileBlobInfo{id: blob.ID, offset: fileOffset})
|
||||
fileOffset += int64(restic.PlaintextLength(int(blob.Length)))
|
||||
fileOffset += int64(blob.DataLength())
|
||||
}
|
||||
pack, ok := packs[packID]
|
||||
if !ok {
|
||||
@@ -195,7 +195,7 @@ func (r *fileRestorer) downloadPack(ctx context.Context, pack *packInfo) error {
|
||||
if packID.Equal(pack.id) {
|
||||
addBlob(blob, fileOffset)
|
||||
}
|
||||
fileOffset += int64(restic.PlaintextLength(int(blob.Length)))
|
||||
fileOffset += int64(blob.DataLength())
|
||||
})
|
||||
if err != nil {
|
||||
// restoreFiles should have caught this error before
|
||||
|
||||
Reference in New Issue
Block a user