Any recompression will cause it to lose quality. Given it's an FLV, the quality will most likely be pretty terrible to begin with, so any mpeg4 based compression (divx/xvid/etc..) at a decent bitrate will be good enough.
If you really are keen though, I think it is h264 which has lossless video compression, but you'll be regretting that once you see how large the resulting file is :P
Edit: Just thinking, I'm sure I've seen a tool to remux from flv into avi without re-encoding, but you'd have to search for it.