jpegoptim is a utility for optimizing JPEG files. It provides lossless
optimization (based on optimizing the Huffman tables) and "lossy"
optimization based on setting a maximum quality factor.
jpeginfo is a command line tool used to generate informative listings of JPEG files, and also to check JPEG files for errors. The program also supports automatic deletion of broken JPEG files.