(w io.Writer)
| 47 | } |
| 48 | |
| 49 | func (c *compressor) Compress(w io.Writer) (io.WriteCloser, error) { |
| 50 | wr := c.writersPool.Get().(*snappy.Writer) |
| 51 | wr.Reset(w) |
| 52 | return writeCloser{wr, &c.writersPool}, nil |
| 53 | } |
| 54 | |
| 55 | func (c *compressor) Decompress(r io.Reader) (io.Reader, error) { |
| 56 | dr := c.readersPool.Get().(*snappy.Reader) |