code: public static void putStringNormalizedKey(
  			BinaryString value, MemorySegment target, int offset, int numBytes) {
  		final int limit = offset + numBytes;
  		final int end = value.getSizeInBytes();
  		for (int i = 0; i < end && offset < limit; i++) {
  			target.put(offset++, value.getByte(i));
  		}
  
  		for (int i = offset; i < limit; i++) {
  			target.put(i, (byte) 0);
  		}
  	}
docs: UTF-8 supports bytes comparison.