code: func (c *CompressResponseWriter) Write(b []byte) (int, error) {
  	if c.closed {
  		return 0, io.ErrClosedPipe
  	}
  	// Abort if parent has been closed
  	if c.parentNotify != nil {
  		select {
  		case <-c.parentNotify:
  			return 0, io.ErrClosedPipe
  		default:
  		}
  	}
  	// Abort if we ourselves have been closed
  	if c.closed {
  		return 0, io.ErrClosedPipe
  	}
  
  	if !c.headersWritten {
  		c.prepareHeaders()
  		c.headersWritten = true
  	}
  	if c.compressionType != "" {
  		return c.compressWriter.Write(b)
  	}
  	return c.OriginalWriter.Write(b)
  }
docs: // Write to the underling buffer