Documentation
¶
Index ¶
- func Decompress(reader io.Reader, file string) (fn string, r io.Reader, err error)
- func DecompressAll(file string) (fn string, b []byte, err error)
- func DecompressRecursive(reader io.Reader, file string) (fn string, r io.Reader, err error)
- func DecompressRecursiveWithContext(reader io.Reader, file string, ctx context.Context) (fn string, r io.Reader, err error)
- func DecompressWithContext(reader io.Reader, file string, ctx context.Context) (fn string, r io.Reader, err error)
- func FinalName(path string) string
- func IsCompressed(fn string) bool
- func Registry(compressor Compressor)
- type Compressor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decompress ¶
func DecompressRecursive ¶
func DecompressWithContext ¶
func IsCompressed ¶
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
Click to show internal directories.
Click to hide internal directories.