The basic compression trade-off is image quality vs. file size.
GIF files
Compression can be adjusted by varying the number of colors in the image. If the image had few colors to begin with (as most charts and diagrams will) this process is lossless (the compressed image is identical to the image before compression).
JPEG files
Compression is lossy (the compressed image is a somewhat degraded version of the original), but for suitable images can yield very small files without noticeable artifacts. Repeated JPEG compression of the same file will however lead to more obvious loss of quality (generation loss). Make sure to keep a copy of the original in a lossless format (such as most TIFF flavors) in case you need to edit the image again.