<p>We have written recent research papers that survey the best schemes for this problem. Please see:</p>

<p>Daniel Lemire and Leonid Boytsov, Decoding billions of integers per second through vectorization,Software: Practice &amp; Experience 45 (1), 2015. 
<a href="http://arxiv.org/abs/1209.2137">http://arxiv.org/abs/1209.2137</a></p>

<p>Daniel Lemire, Nathan Kurz, Leonid Boytsov, SIMD Compression and the Intersection of Sorted Integers, Software: Practice and Experience (to appear) <a href="http://arxiv.org/abs/1401.6399">http://arxiv.org/abs/1401.6399</a></p>

<p>They include an extensive experimental evaluation.</p>

<p>You can find a complete implementation of all techniques in C++11 online:
<a href="https://github.com/lemire/FastPFor">https://github.com/lemire/FastPFor</a> and <a href="https://github.com/lemire/SIMDCompressionAndIntersection">https://github.com/lemire/SIMDCompressionAndIntersection</a></p>

<p>There are also C libraries: <a href="https://github.com/lemire/simdcomp">https://github.com/lemire/simdcomp</a> and <a href="https://github.com/lemire/MaskedVByte">https://github.com/lemire/MaskedVByte</a></p>

<p>If you prefer Java, please see <a href="https://github.com/lemire/JavaFastPFOR">https://github.com/lemire/JavaFastPFOR</a></p>
Best Compression algorithm for a sequence of integers
<p>I have a large array with a range of integers that are mostly continuous, eg 1-100, 110-160, etc. All integers are positive.
What would be the best algorithm to compress this?<br/><br/>
I tried the deflate algorithm but that gives me only 50% compression.
Note that the algorithm cannot be lossy.</p>

<p>All numbers are unique and progressively increasing.</p>

<p>Also if you can point me to the java implementation of such algorithm that would be great.</p>