It should be noted that this only used for clients that do not explicitly ask for a specific compression themselves (as part of the URL). Shuffleboard and the default LabVIEW dashboard allow for setting the compression.
Yes, setCompression() on the MjpegServer object and setting the compression on the dashboard will have the same result (the software will decompress and recompress the image with the requested quality).
Note if you’re going to be compressing with software, you should see if your camera supports a YUYV video mode for the same resolution (instead of MJPEG). This avoids the need for software decompression and will reduce CPU / improve frame rate.
YUYV is a uncompressed data stream from the camera, so it only needs to perform a jpeg compression to stream the image. If receiving an mjpeg stream from the camera, the image must be decompressed, then recompressed with a different compression level. So YUYV saves the decompression by already having an uncompressed image. There is no way to change the compression level on a jpeg image without decompressing it.