gzip

package
v0.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package gzip provides gzip compression middleware

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

Handler creates gzip middleware with default config

func New

New creates gzip middleware with custom config

Types

type Config

type Config struct {
	// Compression level (1-9, where 9 is best compression)
	Level int
	// Minimum response size to compress (bytes)
	MinSize int
	// Content types to compress (if empty, compresses all)
	Types []string
}

Config holds gzip middleware configuration

func DefaultConfig

func DefaultConfig() *Config

DefaultConfig returns sensible defaults

Jump to

Keyboard shortcuts

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