Documentation ¶
Overview ¶
Package encoding 处理 Accept-encoding 报头内容
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Encodings ¶
type Encodings struct {
// contains filtered or unexported fields
}
func NewEncodings ¶
func NewEncodings(errlog logs.Logger) *Encodings
func (*Encodings) Add ¶
func (c *Encodings) Add(id, name string, f NewEncodingFunc)
Allow 实现了 server.Encodings.Add
type NewEncodingFunc ¶
type NewEncodingFunc func() WriteCloseRester
func CompressWriter ¶
func CompressWriter(order lzw.Order, width int) NewEncodingFunc
CompressWriter compress
func ZstdWriter ¶ added in v0.59.0
func ZstdWriter(o ...zstd.EOption) NewEncodingFunc
ZstdWriter zstd
type Pool ¶
type Pool struct {
// contains filtered or unexported fields
}
Pool 压缩对象池
每个 Pool 对象与特定的压缩对象关联,可以复用这些压缩对象。
type WriteCloseRester ¶
type WriteCloseRester interface { io.WriteCloser Reset(io.Writer) }
WriteCloseRester 每种压缩实例需要实现的最小接口
Click to show internal directories.
Click to hide internal directories.