code: func (o *Options) Unmarshal(buf *uio.Lexer) error {
  	*o = make(Options)
  
  	var end bool
  	for buf.Has(1) {
  		// 1 byte: option code
  		// 1 byte: option length n
  		// n bytes: data
  		code := OptionCode(buf.Read8())
  
  		if code == Pad {
  			continue
  		} else if code == End {
  			end = true
  			break
  		}
  		if !buf.Has(1) {
  			return io.ErrUnexpectedEOF
  		}
  
  		length := int(buf.Read8())
  		if length == 0 {
  			continue
  		}
  
  		if !buf.Has(length) {
  			return io.ErrUnexpectedEOF
  		}
  
  		// N bytes: option data
  		data := buf.Consume(length)
  		if data == nil {
  			return io.ErrUnexpectedEOF
  		}
  		data = data[:length:length]
  
  		// RFC 3396: Just concatenate the data if the option code was
  		// specified multiple times.
  		o.AddRaw(code, data)
  	}
  
  	if !end {
  		return io.ErrUnexpectedEOF
  	}
  
  	// Any bytes left must be padding.
  	for buf.Has(1) {
  		if OptionCode(buf.Read8()) != Pad {
  			return ErrInvalidOptions
  		}
  	}
  	return nil
  }
docs: // Unmarshal fills opts with option codes and corresponding values from an
  // input byte slice.
  //
  // It is used with various different types to enable parsing of both top-level
  // options. If options data is malformed, it returns ErrInvalidOptions or
  // io.ErrUnexpectedEOF.