You can compress MIDI data using the same concepts as analog compression. I believe there are also CAL scripts to do this.
1. Use Velocity Scale or the MIDI Velocity plug-in and multiply the notes by a percentage that correlates to the amount you want to compress. For example for 2:1 compression, multiply by 50%. For 3:1 compression, multiply by 33%.
2. This is like applying a compression ratio, but now you need "makeup gain." Use the MIDI Velocity plug-in's Change function to add a positive number.
Here's a practical example. Suppose the original maximum velocity value was 120 and the minimum was 40 (a spread of 80). When you scale these by 50%, the maximum becomes 60 and the minimum, 20. If you add 40 to these values, the maximum will now be 100 and the minimum will be 60. This is a spread of 40 - yup, 2:1 compression

If you add 20, then you'll still have 2:1 compression as the max will be 80 and the min will be 40 - again, a spread of 40 compared to the original 80.
The highest notes are lower and the lowest notes are higher, thus evening out the dynamic range.