public static BytesRef deepCopyOf(BytesRef other) {return new BytesRef(ArrayUtil.copyOfSubArray(other.bytes, other.offset, other.offset + other.length), 0, other.length);}

public static BytesRef DeepCopyOf(BytesRef other){BytesRef copy = new BytesRef();copy.CopyBytes(other);return copy;}
