How to use lossless compression with WP_Image_Editor

With @jgraup ‘s help in comments, I had a look at the responsive images plugin linked there. While that particular one has several other filters on things like post content which I would have preferred not to use, the RespImg class included is exactly what I was wanting. I was originally considering what would be required to remove all the filters added by the plugin… it’s only 5 or 6, however I found a more barebones version of the same class here: https://github.com/nwtn/wp-respimg . It does not include any of the filters other than the one to add that editor class, and dropped into my project nicely.