code: func (p *Packet) MarshalBinary() ([]byte, error) {
  	// 1 byte: message type
  	// 3 bytes: transaction ID
  	// N bytes: options slice byte count
  	b := buffer.New(nil)
  
  	b.Write8(uint8(p.MessageType))
  	b.WriteBytes(p.TransactionID[:])
  
  	opts, err := p.Options.MarshalBinary()
  	if err != nil {
  		return nil, err
  	}
  	b.WriteBytes(opts)
  	return b.Data(), nil
  }
docs: // MarshalBinary allocates a byte slice containing the data
  // from a Packet.