archive

package
v0.0.0-...-b52fdba Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// LZMA extracts lzma archives
	LZMA lzmaExtractor
	// XZ extracts xz archives
	XZ xzExtractor
)
View Source
var BZip2 bzip2Provider

BZip2 extracts bzip2 tar archives

View Source
var GZip gzipArchiveProvider

GZip extracts gzip tar archives

View Source
var Tar tarArchiveProvider

Tar extracts uncompressed tar archives

View Source
var Zip zipExtractor

Zip extracts .zip files

Functions

func Extract

func Extract(dst, src string) error

Extract extracts the given archive to the given destination

func ExtractReader

func ExtractReader(dst, srcName string, src io.Reader) error

ExtractReader extracts the given reader to the given destination

func Register

func Register(suffix string, extractor interface{})

Register registers a new archive extractor. This makes it easy to extend this library from outside

Types

type Extractor

type Extractor interface {
	Extract(dst, src string) error
}

An Extractor implements archive extraction

type ReaderExtractor

type ReaderExtractor interface {
	ExtractReader(dst string, src io.Reader) error
}

A ReaderExtractor extracts readers

Jump to

Keyboard shortcuts

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