gzip

package
v0.0.0-...-1aa08c1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2024 License: BSD-3-Clause Imports: 2 Imported by: 1

Documentation

Overview

Package gzip provides data compression of HTTP responses for clients that support it.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(level int) func(http.Handler) http.Handler

Handler enables gzip compression of HTTP responses for clients that support it via the 'Accept-Encoding' header. The compression level should be any integer value between `1` (optimal speed) and `9` (optimal compression) inclusive.

Compressing TLS traffic may leak the page contents to an attacker if the page contains user input: http://security.stackexchange.com/a/102015/12208

Types

This section is empty.

Jump to

Keyboard shortcuts

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