There are two problems with this question:
Assuming you have a gray scale bitmap, you have two factors to consider:
- For JPGS... what loss of quality is tolerable?
- For pngs... what level of compression is tolerable? (Although for most things I've seen, you don't have that much of a choice, so this choice might be negligible.) For anybody thinking this question doesn't make sense: yes, you can change the amount of compression/number of passes attempted to compress; check out either Ifranview or some of it's plugins.
Answer those questions, and then you might be able to find your original answer.