code: func (s *Scanner) copyObject(w io.Writer) (n int64, err error) {
  	zr := zlibReaderPool.Get().(io.ReadCloser)
  	defer zlibReaderPool.Put(zr)
  
  	if err = zr.(zlib.Resetter).Reset(s.r, nil); err != nil {
  		return 0, fmt.Errorf("zlib reset error: %s", err)
  	}
  
  	defer ioutil.CheckClose(zr, &err)
  	buf := byteSlicePool.Get().([]byte)
  	n, err = io.CopyBuffer(w, zr, buf)
  	byteSlicePool.Put(buf)
  	return
  }
docs: // ReadRegularObject reads and write a non-deltified object
  // from it zlib stream in an object entry in the packfile.