archive

package module
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2026 License: MIT Imports: 12 Imported by: 2 modules, 5 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

archive

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownArchiveFormat = errors.New("unknown archive format")

ErrUnknownArchiveFormat is error returned when file is not recognized as archive.

Functions

func Inflate

func Inflate(name string, reader io.Reader, path string) error

Inflate inflates stream based on file name.

func InflateTar

func InflateTar(reader io.Reader, path string) (retErr error)

InflateTar inflates tar archive.

func InflateTarGz

func InflateTarGz(reader io.Reader, path string) error

InflateTarGz inflates tar.gz archive.

func InflateTarXz

func InflateTarXz(reader io.Reader, path string) error

InflateTarXz inflates tar.xz archive.

func InflateZip

func InflateZip(reader io.Reader, path string) (retErr error)

InflateZip inflates zip archive.

Types

type HashingReader added in v0.3.0

type HashingReader struct {
	// contains filtered or unexported fields
}

HashingReader reads stream, computes and verifies checksum.

func NewHashingReader added in v0.3.0

func NewHashingReader(reader io.Reader, checksum string) (*HashingReader, error)

NewHashingReader creates new hashing reader.

func (*HashingReader) Read added in v0.3.0

func (hr *HashingReader) Read(p []byte) (int, error)

Read reads bytes from stream.

func (*HashingReader) ValidateChecksum added in v0.3.0

func (hr *HashingReader) ValidateChecksum() error

ValidateChecksum validates checksum. Before validating it reads all the remaining bytes from stream to ensure that checksum is computed from all bytes.

Jump to

Keyboard shortcuts

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