@NonNull
	public static String encode(@NonNull final byte[] inputByte) {
		if (inputByte.length == 0) {
			return ""; //$NON-NLS-1$
		}
		final byte[] input = copyOfRange(inputByte, 0, inputByte.length);
		final int inputLength = inputByte.length;
		// Count leading zeroes.
		int zeroCount = 0;
		while (zeroCount < inputLength && input[zeroCount] == 0) {
			++zeroCount;
		}
		// The actual encoding.
		final int tempLength = inputLength * 2;
		final byte[] temp = new byte[tempLength];

		int j = tempLength;
		int startAt = zeroCount;
		while (startAt < inputLength) {
			final byte mod = divmod58(input, startAt);
			if (input[startAt] == 0) {
				++startAt;
			}
			temp[--j] = (byte) ALPHABET[mod];
		}

		// Strip extra '1' if there are some after decoding.
		while (j < tempLength && temp[j] == ALPHABET[0]) {
			++j;
		}
		// Add as many leading '1' as there were leading zeros.
		while (--zeroCount >= 0) {
			temp[--j] = (byte) ALPHABET[0];
		}

		final byte[] output = copyOfRange(temp, j, tempLength);
		try {
			return new String(output, "US-ASCII"); //$NON-NLS-1$
		} catch (final UnsupportedEncodingException e) {
			throw new RuntimeException(e); // Cannot happen.
		}
	}