compression

package module
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 2 Imported by: 5

README

Compression

This compression middleware is no longer maintained, please use the Fiber Compress middleware

Documentation

Index

Constants

View Source
const (
	LevelNoCompression         = -1
	LevelDefaultCompression    = 0
	LevelBestSpeed             = 1
	LevelBestCompression       = 2
	LevelHuffmanOnly           = 3
	LevelDefaultBrotli         = 4
	LevelBrotliBestSpeed       = 5
	LevelBrotliBestCompression = 6
)

Supported compression levels

Variables

This section is empty.

Functions

func New

func New(config ...Config) func(*fiber.Ctx)

New ...

Types

type Config

type Config struct {
	// Filter defines a function to skip middleware.
	// Optional. Default: nil
	Filter func(*fiber.Ctx) bool
	// Level of compression
	// Optional. Default value 0.
	Level int
}

Config ...

Jump to

Keyboard shortcuts

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