packfile

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 27, 2023 License: Apache-2.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

View Source
const (
	ObjectCommit int = iota + 1
	ObjectTable
	ObjectBlock
)
View Source
const Version uint32 = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type PackfileInfo added in v0.11.7

type PackfileInfo struct {
	Version uint32
	Objects [][2]string
}

func (*PackfileInfo) AddObject added in v0.11.7

func (i *PackfileInfo) AddObject(objType int, sum []byte) error

type PackfileReader

type PackfileReader struct {
	Version int
	Info    *PackfileInfo
	// contains filtered or unexported fields
}

func NewPackfileReader

func NewPackfileReader(r io.ReadCloser) (*PackfileReader, error)

func (*PackfileReader) Close

func (r *PackfileReader) Close() error

func (*PackfileReader) ReadObject

func (r *PackfileReader) ReadObject() (objType int, b []byte, err error)

type PackfileWriter

type PackfileWriter struct {
	Info *PackfileInfo
	// contains filtered or unexported fields
}

func NewPackfileWriter

func NewPackfileWriter(w io.Writer) (*PackfileWriter, error)

func (*PackfileWriter) WriteObject

func (w *PackfileWriter) WriteObject(objType int, b []byte) (int, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL