Versions in this module Expand all Collapse all v1 v1.100.1 Jan 10, 2022 Changes in this version + var ErrMinBufferSize = errors.New("buffer size option cannot be less than -1") + var ErrMinConcurrency = errors.New("concurrency must be at least 1") + func FlateCompressor(level int) func(w io.Writer) (io.WriteCloser, error) + func FlateDecompressor() func(r io.Reader) io.ReadCloser + func StdFlateCompressor(level int) func(w io.Writer) (io.WriteCloser, error) + func StdFlateDecompressor() func(r io.Reader) io.ReadCloser + type Archiver struct + func NewArchiver(w io.Writer, chroot string, opts ...ArchiverOption) (*Archiver, error) + func (a *Archiver) Archive(ctx context.Context, files map[string]os.FileInfo) (err error) + func (a *Archiver) Close() error + func (a *Archiver) RegisterCompressor(method uint16, comp zip.Compressor) + func (a *Archiver) Written() (bytes, entries int64) + type ArchiverOption func(*archiverOptions) error + func WithArchiverBufferSize(n int) ArchiverOption + func WithArchiverConcurrency(n int) ArchiverOption + func WithArchiverMethod(method uint16) ArchiverOption + func WithArchiverOffset(n int64) ArchiverOption + func WithStageDirectory(dir string) ArchiverOption + type Extractor struct + func NewExtractor(filename, chroot string, opts ...ExtractorOption) (*Extractor, error) + func NewExtractorFromReader(r io.ReaderAt, size int64, chroot string, opts ...ExtractorOption) (*Extractor, error) + func (e *Extractor) Close() error + func (e *Extractor) Extract(ctx context.Context) (err error) + func (e *Extractor) Files() []*zip.File + func (e *Extractor) RegisterDecompressor(method uint16, dcomp zip.Decompressor) + func (e *Extractor) Written() (bytes, entries int64) + type ExtractorOption func(*extractorOptions) error + func WithExtractorChownErrorHandler(fn func(name string, err error) error) ExtractorOption + func WithExtractorConcurrency(n int) ExtractorOption