Help us shape the future of Go! Take the 2026 Go Developer Survey

compress

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Overview

Package compress compresses responses for clients that accept gzip.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(configs ...Config) zinc.Middleware

New compresses responses for clients that accept gzip and preserves the optional ResponseWriter interfaces used by streaming and connection upgrades.

Types

type Config

type Config struct {
	Level     int
	MinLength int
}

Config controls the gzip compression level and the smallest body worth compressing.

Jump to

Keyboard shortcuts

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