@Override
	public byte[] FindShortestSeparator(byte[] start, Slice limit) {

		// Find length of common prefix
		int min_length = Math.min(start.length, limit.size());
		int diff_index = 0;
		while ((diff_index < min_length)
				&& (start[diff_index] == limit.get(diff_index))) {
			diff_index++;
		}

		if (diff_index >= min_length) {
			// Do not shorten if one string is a prefix of the other
		} else {
			int diff_byte = (start[diff_index] & 0xff);
			if (diff_byte < 0xff
					&& diff_byte + 1 < (limit.get(diff_index) & 0xff)) {
				start[diff_index]++;
				start = util.head(start, diff_index + 1); // 0...diff_index
				// start.resize(diff_index + 1);
				// assert(Compare(*start, limit) < 0);
			}
		}

		return start;

	}