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`. This will allow us to refactor private methods without worrying about breaking public APIs.