[Question] How useful are masks during an epidemic?

This was a pretty contentious part of the debate on the CDC’s recommendations and has come up elsewhere as well: how effective are masks at preventing infection when worn by an uninfected individual? How about preventing spread when worn by an infected individual? Are there things you can do that make it more or less useful?

This is a thread for evidence to answer those questions and related ones. Obviously the more rigorous the better, but case studies like this one about one dude on a bus would be useful had they not been retracted (thanks to gwillen for pointing this out).