I am not sure if there is OOTB for this, i let other experts to comment on these.
But you can surly create a custom service that can do Image compression. There are many java Image compression libraries available that you can use to compress the images and later using compressed images to save in JCR/DAM.