we can use spgroup.containscurrentuser to check if current user is in each group, and we can use spweb.sitegroups to find out all the groups, so we can find out all the spgroups in a site collection where current user is member;
also, spuser.groups returns all the spgroups the user belongs to;
But, i find difference between these two methods: for some spgroup, i added Everyone into it. I can find myself member of the group with spgroups.containcurrentuser, even though i am not added into the group directly. But spuser.groups does not return this group for me.