code: func NewReaderToWriterAdapter(writerFactory func(io.Writer) (io.Writer, error),
  	upstream io.Reader) (io.ReadCloser, error) {
  	retval := ReaderToWriterAdapter{
  		writer:     nil,
  		upstream:   upstream,
  		readBuffer: make([]byte, 65536),
  	}
  	var err error
  	retval.writer, err = writerFactory(&retval.writeBuffer)
  	return &retval, err
  }
docs: // This makes a new ReaderToWriterAdapter
  // it requires a factory to generate the writer-to-be-wrapped
  // The reason is that the writer will require another "downstream" writer
  // to be bound with. Each type of writer (eg zlib.NewWriter) may have
  // a slightly different way of being bound with a downstream writer
  // so here, the user must provide a factory function into this
  // constructor and then the constructor will be invoked with an
  // implementation-defined downstream writer, which will allow the writer
  // to act as a reader from the outside