code: function processMessage(conn, message) {
    const msgHeader = parseHeader(message);
    if (msgHeader.opCode !== OP_COMPRESSED) {
      const ResponseConstructor = msgHeader.opCode === OP_MSG ? BinMsg : Response;
      conn.emit(
        'message',
        new ResponseConstructor(
          conn.bson,
          message,
          msgHeader,
          message.slice(MESSAGE_HEADER_SIZE),
          conn.responseOptions
        ),
        conn
      );
  
      return;
    }
  
    msgHeader.fromCompressed = true;
    let index = MESSAGE_HEADER_SIZE;
    msgHeader.opCode = message.readInt32LE(index);
    index += 4;
    msgHeader.length = message.readInt32LE(index);
    index += 4;
    const compressorID = message[index];
    index++;
  
    decompress(compressorID, message.slice(index), (err, decompressedMsgBody) => {
      if (err) {
        conn.emit('error', err);
        return;
      }
  
      if (decompressedMsgBody.length !== msgHeader.length) {
        conn.emit(
          'error',
          new MongoError(
            'Decompressing a compressed message from the server failed. The message is corrupt.'
          )
        );
  
        return;
      }
  
      const ResponseConstructor = msgHeader.opCode === OP_MSG ? BinMsg : Response;
      conn.emit(
        'message',
        new ResponseConstructor(
          conn.bson,
          message,
          msgHeader,
          decompressedMsgBody,
          conn.responseOptions
        ),
        conn
      );
    });
  }
docs: Handle a message once it is received