compress

package module
v0.0.0-...-3519808 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2017 License: MIT Imports: 6 Imported by: ? 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

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
⌂ 换网址