repository: move Blob, Blobs and PackedBlob to pack package

This removes them from the public interface. The latter now only
provides the PackBlob interface, without being bound to the type used
internally by the pack package.
This commit is contained in:
Michael Eischer committed 2026-06-13 18:58:37 +02:00
1 parent 35af104749
commit c062a78dcd
27 files changed
+373 -345

No files matched your search

+19
View File
@@ -0,0 +1,19 @@
package pack
import "github.com/restic/restic/internal/restic"
// PackedBlob is one index entry for a blob in a pack (may be duplicate across indexes).
type PackedBlob struct {
Pack restic.ID
Blob Blob
}
func (pb *PackedBlob) PackID() restic.ID { return pb.Pack }
func (pb *PackedBlob) Handle() restic.BlobHandle { return pb.Blob.BlobHandle }
func (pb *PackedBlob) CiphertextLength() uint { return pb.Blob.Length }
func (pb *PackedBlob) PlaintextLength() uint { return pb.Blob.DataLength() }
func (pb *PackedBlob) IsCompressed() bool { return pb.Blob.IsCompressed() }