IdSetLexicon is a class for compactly representing sets of non-negative integers such as array indices ("id sets"). It is especially suitable when either (1) there are many duplicate sets, or (2) there are many singleton or empty sets. See also ValueLexicon and SequenceLexicon.