Add an encoding/binary version of the unsafe function, for documentation

It's many many times slower than the unsafe version.