But if I pick my buckets right, I can store only the lsb in each bucket.
Or more efficient, dynamically construct an implicit trie/heap type thing, where each leaf is the count of times that int appears (and the int itself is encoded in the location)
That feels really, really handwavy but promising?