<p>This paper does exactly this.</p>
<p>Compressing Multisets with Large Alphabets</p>
<p>Paper: <a href="https://arxiv.org/abs/2107.09202" rel="nofollow noreferrer">https://arxiv.org/abs/2107.09202</a></p>
<p>Code: <a href="https://github.com/facebookresearch/multiset-compression" rel="nofollow noreferrer">https://github.com/facebookresearch/multiset-compression</a></p>
<p>Summary: <a href="https://twitter.com/_dsevero/status/1419661190750425102" rel="nofollow noreferrer">https://twitter.com/_dsevero/status/1419661190750425102</a></p>
Space-efficient way to store a multiset/unordered list
<p>I need to store a large number of integers in a file. The order of the integers does not matter, so the total information content should be lower than that of an ordered list. Is there a more space-efficient way to store the numbers than as an arbitrarily ordered array?</p>

<p>Edit: I assume the integers to be completely random. I am really looking for a universal way to squeeze out the redundant information which is introduced by fixing a permutation.</p>