bs58: avoid two unnecessary iterations
bs58: check for zeros before worrying about length