MCPcopy Create free account
hub / github.com/caddyserver/caddy / NewEncoder

Method NewEncoder

modules/caddyhttp/encode/zstd/zstd.go:118–124  ·  view source on GitHub ↗

NewEncoder returns a new Zstandard writer.

()

Source from the content-addressed store, hash-verified

116
117// NewEncoder returns a new Zstandard writer.
118func (z Zstd) NewEncoder() encode.Encoder {
119 // The default of 8MB for the window is
120 // too large for many clients, so we limit
121 // it to 128K to lighten their load.
122 writer, _ := zstd.NewWriter(nil, z.writerOptions(128<<10)...)
123 return writer
124}
125
126func (z Zstd) writerOptions(windowSize int) []zstd.EOption {
127 opts := []zstd.EOption{

Callers

nothing calls this directly

Calls 1

writerOptionsMethod · 0.95

Tested by

no test coverage detected