public static Set<ByteArrayWrapper> deserialize(byte[] byteArray) {
    if (byteArray == null) {
      return Collections.emptySet();
    }

    Set<ByteArrayWrapper> set = new HashSet<>();

    ByteBuffer buffer = ByteBuffer.wrap(byteArray);
    int setSize = buffer.getInt(); // Read the size of the set

    for (int i = 0; i < setSize; i++) {
      int elementSize = buffer.getInt(); // Read the size of the element
      byte[] element = new byte[elementSize];
      buffer.get(element); // Read the element bytes
      ByteArrayWrapper baw = new ByteArrayWrapper(element, elementSize);
      set.add(baw);
    }

    return set;
  }
Deserializes a byte array into a set of ByteArrayWrapper objects.

@param byteArray the byte array to deserialize
@return the deserialized set of ByteArrayWrapper objects
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/main/java/org/apache/amoro/flink/lookup/ByteArraySetSerializer.java