wcompress

package
v0.0.0-...-ae08ad9 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: Apache-2.0 Imports: 9 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decompress

func Decompress(reader io.Reader, file string) (fn string, r io.Reader, err error)

func DecompressAll

func DecompressAll(file string) (fn string, b []byte, err error)

func DecompressRecursive

func DecompressRecursive(reader io.Reader, file string) (fn string, r io.Reader, err error)

func DecompressRecursiveWithContext

func DecompressRecursiveWithContext(reader io.Reader, file string, ctx context.Context) (fn string, r io.Reader, err error)

func DecompressWithContext

func DecompressWithContext(reader io.Reader, file string, ctx context.Context) (fn string, r io.Reader, err error)

func FinalName

func FinalName(path string) string

func IsCompressed

func IsCompressed(fn string) bool

func Registry

func Registry(compressor Compressor)

Types

type Compressor

type Compressor struct {
	Name       string
	Ext        []string
	Decompress func(ctx context.Context, reader io.Reader) (r io.Reader, err error)
	Compress   func(ctx context.Context, writer io.Writer) (w io.Writer, err error)
}

func FindCompressorByExt

func FindCompressorByExt(ext string) *Compressor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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