gzip

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2016 License: Apache-2.0, Apache-2.0 Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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