Is lossless image and PDF compression possible?

the image/pdf should be at least bare min legible.
I saw d/f algo like imagemagick ghostscript