What is the most compact (space efficient) method of storing an array of distinct integers? I have an array of distinct integers which I want to save in the most compact manner. I may have to do occasional lookups, deletions, and insertions in this array so the compression algorithm must adjust for such cases.
What is the appropriate algorithm/ data structure that I should think of?

Is there anything along the lines of Huffman encoding but for numbers?
If your integers have small difference between them you can use a bitset with an offset. In this way if the difference between the largest and the smallest is n you need n bits + the size of the offset in bits. If your integer set is sparse you can use a sparse bitset implementation like Roaring bitmap .