B2G/gecko/dom/mobilemessage/src/ril/MmsPduHelper.jsm
/**
   * @param data
   *        A wrapped object containing raw PDU data.
   *
   * @return A decoded object containing a string property `contentReference`
   *         and an optinal `params` name-value map.
   */
@param data
A wrapped object containing raw PDU data.

@return A decoded object containing a string property `contentReference`
and an optinal `params` name-value map.
@param data A wrapped object containing raw PDU data . @return A decoded object containing a string property ` contentReference ` and an optinal ` params ` name - value map .
function decode(data) {
    let length = WSP.ValueLength.decode(data);
    let end = data.offset + length;
    let result = {};
    result.contentReference = WSP.TextString.decode(data);
    if (data.offset < end) {
      result.params = Parameter.decodeMultiple(data, end);
    }
    if (data.offset != end) {
      data.offset = end;
    }
    return result;
  }
function decode ( data ) { let length = WSP . ValueLength . decode ( data ) ; let end = data . offset + length ; let result = { } ; result . contentReference = WSP . TextString . decode ( data ) ; if ( data . offset < end ) { result . params = Parameter . decodeMultiple ( data , end ) ; } if ( data . offset != end ) { data . offset = end ; } return result ; }
@param data
        A wrapped object containing raw PDU data.
@param data A wrapped object containing raw PDU data .
// Explicitly seek to end in case of skipped parameters.