Python: Adding Golomb coding for EV whitelist.

Golomb coding hashes the fixed 8-bytes EV cert hashes by 20%.
Is this really the best way to check that an int has just 1 bit set in python?