NewEncoder returns a new Zstandard writer.
()
| 116 | |
| 117 | // NewEncoder returns a new Zstandard writer. |
| 118 | func (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 | |
| 126 | func (z Zstd) writerOptions(windowSize int) []zstd.EOption { |
| 127 | opts := []zstd.EOption{ |
nothing calls this directly
no test coverage detected