Documentation ¶
Overview ¶
Package pack provides functions for combining and parsing pack files.
Index ¶
Constants ¶
View Source
const ( // HeaderSize is the header's constant overhead (independent of #entries) HeaderSize = headerLengthSize + crypto.Extension )
Variables ¶
Functions ¶
func List ¶
func List(k *crypto.Key, rd io.ReaderAt, size int64) (entries []restic.Blob, hdrSize uint32, err error)
List returns the list of entries found in a pack file and the length of the header (including header size and crypto overhead)
func PackedSizeOfBlob ¶
PackedSizeOfBlob returns the size a blob actually uses when saved in a pack
Types ¶
type InvalidFileError ¶
type InvalidFileError struct {
Message string
}
InvalidFileError is return when a file is found that is not a pack file.
func (InvalidFileError) Error ¶
func (e InvalidFileError) Error() string
type Packer ¶
type Packer struct {
// contains filtered or unexported fields
}
Packer is used to create a new Pack.
func (*Packer) Add ¶
Add saves the data read from rd as a new blob to the packer. Returned is the number of bytes written to the pack.
Click to show internal directories.
Click to hide internal directories.