gzip

package
v3.0.4+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2016 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0

README

gzip Build Status

Middleware gzip provides compress to responses for Macaron.

Installation
go get github.com/go-macaron/gzip

Getting Help

Credits

This package is a modified version of martini-contrib/gzip.

License

This project is under the Apache License, Version 2.0. See the LICENSE file for the full license text.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gziper

func Gziper(options ...Options) macaron.Handler

Gziper returns a Handler that adds gzip compression to all requests. Make sure to include the Gzip middleware above other middleware that alter the response body (like the render middleware).

Types

type Options

type Options struct {
	// Compression level. Can be DefaultCompression(-1), ConstantCompression(-2)
	// or any integer value between BestSpeed(1) and BestCompression(9) inclusive.
	CompressionLevel int
}

Options represents a struct for specifying configuration options for the GZip middleware.

Jump to

Keyboard shortcuts

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