[ImageMagik][1] `convert` allows command line usage, batch processing and will convert your jpegs to jpeg2000 which may save you some space and has several other options.  Unless you have made a backup first I would recommend not overwriting existing files until you have checked the conversion worked as things can go wrong with any tool.

Note that zip or targz individual jpegs normally results in an increase in size if you need to save space then tar directories and tar does have the option `--remove-files` to remove files as they are added to the archive.  While it will not make the files smaller you will only waste space after one file rather than after each file.

For Info:

> $ convert -list compress
>
> B44 B44A BZip DXT1 DXT3 DXT5 Fax Group4 JBIG1 JBIG2 JPEG JPEG2000
> Lossless LosslessJPEG LZMA LZW None Piz Pxr24 RLE Zip RunlengthEncoded
> ZipS



  [1]: http://www.imagemagick.org/