Documentation ¶
Overview ¶
Package pack provides functions for combining and parsing pack files.
Index ¶
- type Blob
- type BlobType
- type Packer
- func (p *Packer) Add(t BlobType, id backend.ID, rd io.Reader) (int64, error)
- func (p *Packer) Blobs() []Blob
- func (p *Packer) Count() int
- func (p *Packer) Finalize() (bytesWritten uint, err error)
- func (p *Packer) ID() backend.ID
- func (p *Packer) Size() uint
- func (p *Packer) String() string
- func (p *Packer) Writer() io.Writer
- type Unpacker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlobType ¶
type BlobType uint8
const ( Data BlobType = 0 Tree = 1 )
func (BlobType) MarshalJSON ¶
func (*BlobType) UnmarshalJSON ¶
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.
type Unpacker ¶
type Unpacker struct { Entries []Blob // contains filtered or unexported fields }
Unpacker is used to read individual blobs from a pack.
func NewUnpacker ¶
NewUnpacker returns a pointer to Unpacker which can be used to read individual Blobs from a pack.
Click to show internal directories.
Click to hide internal directories.