Make all methods private except decode and encode

In Ruby, private is more of a suggestion than a policy, but we shouldn’t encourage calling methods other than `decode` and `encode`.