Lines Matching refs:r
27 type Decompressor func(r io.Reader) io.ReadCloser
69 func newFlateReader(r io.Reader) io.ReadCloser {
72 fr.(flate.Resetter).Reset(r, nil)
74 fr = flate.NewReader(r)
84 func (r *pooledFlateReader) Read(p []byte) (n int, err error) {
85 r.mu.Lock()
86 defer r.mu.Unlock()
87 if r.fr == nil {
90 return r.fr.Read(p)
93 func (r *pooledFlateReader) Close() error {
94 r.mu.Lock()
95 defer r.mu.Unlock()
97 if r.fr != nil {
98 err = r.fr.Close()
99 flateReaderPool.Put(r.fr)
100 r.fr = nil