compress

package module
v0.0.0-...-52cd1ea Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2016 License: MIT Imports: 6 Imported by: 2

README

compress

Package compress is a handler for the core.
It provides a clever gzip compressing handler.

GoDoc

Documentation

Overview

Package compress is a handler for the core (https://godoc.org/github.com/volatile/core). It provides a clever gzip compressing handler.

It takes care to not handle small contents, or contents that are already compressed (like JPEG, MPEG or PDF). Trying to gzip them not only wastes CPU but can potentially increase the response size.

Usage

Use adds the handler to the default handlers stack:

compress.Use()

Make sure to include this handler above any other handler that alter the response body.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Use

func Use()

Use adds the handler to the default handlers stack. It compress all the compressible responses.

Types

This section is empty.

Jump to

Keyboard shortcuts

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