(w io.Writer)
| 40 | } |
| 41 | |
| 42 | func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) { |
| 43 | wr := c.writersPool.Get().(*snappy.Writer) |
| 44 | wr.Reset(w) |
| 45 | return writeCloser{wr, &c.writersPool}, nil |
| 46 | } |
| 47 | |
| 48 | func (c *compressor) Decompress(r io.Reader) (io.Reader, error) { |
| 49 | dr := c.readersPool.Get().(*snappy.Reader) |