I saw that we can encode an array of ints into a BitSet and retrieve them as in :
int[] ints = new int[]{5, 7, 25, 100102244};
BitSet b = new BitSet();
for (int i=0;i<ints.length;i++)
b.set(ints[i]);
b.stream().forEach(i -> System.out.println(i));
which outputs
5
7
25
100102244
Is it possible to do the same for an array of longs ?
Thanks in advance,