package encode import "io" // Encoder interface contains the encoder for response. // Eg. gzip, flate compressions. type Encoder interface { Encode(w io.Writer) io.Writer Decode(r io.Reader) io.Reader } type encoder struct { } func (_ *encoder) Encode(w io.Writer) io.Writer { return w } func (_ *encoder) Decode(r io.Reader) io.Reader { return r } var DefaultEncoder = &encoder{}