code: func HeaderSize(h Header) (n int) {
  	switch {
  	case h.Length < 126:
  		n = 2
  	case h.Length <= len16:
  		n = 4
  	case h.Length <= len64:
  		n = 10
  	default:
  		return -1
  	}
  	if h.Masked {
  		n += len(h.Mask)
  	}
  	return n
  }
docs: // HeaderSize returns number of bytes that are needed to encode given header.
  // It returns -1 if header is malformed.