In my Jetson Xavier, a see 'libjpegturbo' library is available. How can I make compressed_image_transport plugin to use 'turbojpeg' library for good compression level.
Checking the implementation of compressed_publisher.cpp at GitHub shows the compression is done using OpenCV's imencode:
cv::imencode(".jpg", cv_ptr->image, compressed.data, params)
OpenCV is able to use libjpegturbo only by building OpenCV from source code to incorporate libjpeg-turbo to OpenCV. This is described in this tutorial.
Another option (maybe much simpler) would be to implement your own image transport plugin. Therefore you can orient on the existing one.