encoding

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BrType = iota
	GzipType
	DeflateType
	IdentityType
	UnknownType
)

Variables

This section is empty.

Functions

func ParseAcceptEncoding

func ParseAcceptEncoding(headerValue []byte) int

ParseAcceptEncoding parses Accept-Encoding http header value.

func ParseContentEncoding

func ParseContentEncoding(headerValue []byte) ([]int, error)

ParseContentEncoding parses Content-Encoding http header value.

func ToString

func ToString(encoding int) string

ToString translates enum type into string value. Its faster to have enum, rather then redefine types with String() method.

Types

type UnsupportedContentEncodingError

type UnsupportedContentEncodingError string

UnsupportedContentEncodingError indicates that a provided Content-Encoding field is not supported.

func (UnsupportedContentEncodingError) Error

Jump to

Keyboard shortcuts

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