compression

package
v0.0.0-...-541cb8d Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2017 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Gzip

type Gzip struct {
	*Options
}

Gzip compression support

func NewGzip

func NewGzip() *Gzip

NewGzip creates a Gzip + Options variable

func (*Gzip) Compress

func (gz *Gzip) Compress(content []byte) ([]byte, error)

Compress to gzip

type Options

type Options struct {
	// activates the compression
	// default: false
	Compress bool

	// valid values are:
	// -> "NoCompression"
	// -> "BestSpeed"
	// -> "BestCompression"
	// -> "DefaultCompression"
	//
	// default: "DefaultCompression" // when: Compress == true && Method == ""
	Method string

	// true = do it yourself (the file is written as gzip into the memory file system)
	// false = decompress at run time (while writing file into memory file system)
	// default: false
	Keep bool
}

Options for compression

Jump to

Keyboard shortcuts

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