code: function DecodeMessage (raw) {
    if (!(raw instanceof BufferList)) {
      raw = new BufferList(raw)
    }
  
    var version = msgpack.decode(raw)
    var messageType = msgpack.decode(raw)
    var MessageClass = messageTypeToFunction[messageType]
  
    if (!MessageClass) {
      throw new DxlError('Unknown message type: ' + messageType)
    }
  
    var message = new MessageClass()
    message.version = version
    message._unpackMessage(raw)
    if (version > 0) {
      message._unpackMessagev1(raw)
    }
    if (version > 1) {
      message._unpackMessagev2(raw)
    }
  
    return message
  }
docs: Decodes a raw buffer into a {@link Message} object.
  @private
  @param {(String|Buffer|BufferList)} raw - Raw buffer to decode.
  @returns {Message} The decoded message.
  @constructor