How compensatory picks work??

I'm pretty sure that quality factors in as well as quantity.

Say the Chargers lose Drew Brees in Free Agency and sign Joe Schmoe as their backup to Rivers. It is a one for one swap but there is a huge drop off in quality.

Yes there are certain players that are considered "compensatory free agents". Drew Brees will be a compensatory free agent, Billy Miller will not.