code: func (msg *MsgGetData) BtcDecode(r io.Reader, pver uint32, enc MessageEncoding) error {
  	count, err := ReadVarInt(r, pver)
  	if err != nil {
  		return err
  	}
  
  	// Limit to max inventory vectors per message.
  	if count > MaxInvPerMsg {
  		str := fmt.Sprintf("too many invvect in message [%v]", count)
  		return messageError("MsgGetData.BtcDecode", str)
  	}
  
  	// Create a contiguous slice of inventory vectors to deserialize into in
  	// order to reduce the number of allocations.
  	invList := make([]InvVect, count)
  	msg.InvList = make([]*InvVect, 0, count)
  	for i := uint64(0); i < count; i++ {
  		iv := &invList[i]
  		err := readInvVect(r, pver, iv)
  		if err != nil {
  			return err
  		}
  		msg.AddInvVect(iv)
  	}
  
  	return nil
  }
docs: // BtcDecode decodes r using the bitcoin protocol encoding into the receiver.
  // This is part of the Message interface implementation.