compression

package
v0.0.0-...-6e5808f Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Compressions = []Compression{&Zstd{}, &Gzip{}, &None{}}

In order of download preference. First item is the default for uploading files.

Functions

This section is empty.

Types

type Compression

type Compression interface {
	Name() string
	Extension() string
	WrapRead(source io.Reader) (io.Reader, func())
	WrapWrite(dest io.Writer) (io.Writer, func())
}

type Gzip

type Gzip struct{}

func (*Gzip) Extension

func (g *Gzip) Extension() string

func (*Gzip) Name

func (g *Gzip) Name() string

func (*Gzip) WrapRead

func (g *Gzip) WrapRead(source io.Reader) (io.Reader, func())

func (*Gzip) WrapWrite

func (g *Gzip) WrapWrite(dest io.Writer) (io.Writer, func())

type None

type None struct{}

func (*None) Extension

func (n *None) Extension() string

func (*None) Name

func (n *None) Name() string

func (*None) WrapRead

func (n *None) WrapRead(source io.Reader) (io.Reader, func())

func (*None) WrapWrite

func (n *None) WrapWrite(dest io.Writer) (io.Writer, func())

type Zstd

type Zstd struct{}

func (*Zstd) Extension

func (g *Zstd) Extension() string

func (*Zstd) Name

func (g *Zstd) Name() string

func (*Zstd) WrapRead

func (g *Zstd) WrapRead(source io.Reader) (io.Reader, func())

func (*Zstd) WrapWrite

func (g *Zstd) WrapWrite(dest io.Writer) (io.Writer, func())

Jump to

Keyboard shortcuts

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