code: func ReadFrame(r io.Reader) (f Frame, err error) {
  	f.Header, err = ReadHeader(r)
  	if err != nil {
  		return
  	}
  
  	if f.Header.Length > 0 {
  		// int(f.Header.Length) is safe here cause we have
  		// checked it for overflow above in ReadHeader.
  		f.Payload = make([]byte, int(f.Header.Length))
  		_, err = io.ReadFull(r, f.Payload)
  	}
  
  	return
  }
docs: // ReadFrame reads a frame from r.
  // It is not designed for high optimized use case cause it makes allocation
  // for frame.Header.Length size inside to read frame payload into.
  //
  // Note that ReadFrame does not unmask payload.