Encode has a wrapper around the C API too, same speed not worth the import