archive

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Extract

func Extract(archivePath, dest string) ([]byte, error)

Extract writes every entry of the delta archive into dest and returns the sidecar bytes. dest must already exist and be empty.

func Pack

func Pack(srcDir string, sidecar []byte, outPath string, c Compression) error

Pack writes a tar archive containing every file under srcDir plus the sidecar payload as "diffah.json" at the archive root.

Pack writes to outPath+".tmp" first and renames on success, guaranteeing that observers never see a partial file at outPath.

func ReadSidecar

func ReadSidecar(archivePath string) ([]byte, error)

ReadSidecar returns the sidecar bytes from a delta archive without extracting the rest of the entries.

Types

type Compression

type Compression string

Compression is the outer wrapper applied to the tar stream.

const (
	CompressNone Compression = "none"
	CompressZstd Compression = "zstd"
)

Jump to

Keyboard shortcuts

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